|
TelegramComposition telegrams = drvObj.Telegrams;
Telegram telegram = telegrams.Find(TelegramType.MainTelegram);
Console.WriteLine("The Cu has the telegram: " + telegram.TelegramNumber);
Console.WriteLine("The Setpoint channel-specific size of the telegram is: " + telegram.GetOutputSize());
foreach (var address in telegram.Addresses)
{
if (address.IoType == AddressIoType.Output)
{
Console.WriteLine("The Setpoint channel-specific IO start address of the telegram on the connected PLC is: " + address.StartAddress);
}
else if(address.IoType == AddressIoType.Input)
{
Console.WriteLine("The Actual value channel-specific IO start address of the telegram on the connected PLC is: " + address.StartAddress);
}
}
// Add an additional telegram
if (drvObj.Telegrams.CanInsertAdditionalTelegram(2,4))
{
drvObj.Telegrams.InsertAdditionalTelegram(2,4);
}
// Add a 3 word extension to the main telegram
Telegram mainTelegram == drvObj.Telegrams.Find(TelegramType.MainTelegram);
Int32 newSize = mainTelegram.GetSize(AddressIoType.Input) + 3;
if (mainTelegram.CanChangeSize(AddressIoType.Input, newSize, true))
{
mainTelegram.ChangeSize(AddressIoType.Input, newSize, true)
}
|