Reputation: 65
I'd like to use SumSymbolRead to read multiple symbols with ADS in TwinCAT. I can do this when reading symbols from a port pointing to a PLC. I followed an example from Beckhoff:
using (AdsClient client = new AdsClient())
{
client.Connect(address,port);
// Load symbolic information
ISymbolLoader loader = SymbolLoaderFactory.Create(client, SymbolLoaderSettings.Default);
var allSymbols = loader.Symbols;
ISymbol bVar1 = allSymbols["MAIN.Input1"];
ISymbol bVar1 = allSymbols["MAIN.Output1"];
SymbolCollection symbols = new SymbolCollection() {bVar1, bVar2};
// Sum Command Read
SumSymbolRead readCommand = new SumSymbolRead(client,symbols);
object[] values = readCommand.Read();
}
When I try the same thing with an EtherCAT master (using symbols I've verified exist on the master), I get an error saying "Device service not supported". Is there a way to enable this service for an EtherCAT master?
Upvotes: 1
Views: 524
Reputation: 390
You can simply make a task and link all the variables from the EtherCAT master there, all you need is the port number of the task, as well as tick the "create symbols" check box in the settings of the task.
Upvotes: 0
Reputation: 65
I spoke with Beckhoff about this issue. They say Sum Writes are not supported in IO. So, this is not possible to do with a Master.
Upvotes: 0