Your project helped me in programming my Java version, so I will add something new... In newer versions of CoDeSys there is a new setting Request on bootup/ Answer bootup request. When Answer bootup request is activated, the current value of the variable(s) can be requested through this. The data is in CTelegram format, but there are a few changes.
CTelegram.ID = 6
CTelegram.Index = Cob-ID
CTelegram.SubIndex = 0 / Variable index If "Pack-Variables" is disabled
CTelegram.items = Number of Variables / 1 If "Pack-Variables" is disabled
CTelegram.Length = 0x14
CTelegram.Counter = always 0
CTelegram.Flags = always 0
CTelegram.Checksum = always 0
CTelegram.Data = byte[0]
ID Index SubIndex items Length Counter Flags CRC
vvvvvvvvvvvvvvvvvvvvv vvvvvvvvvv vvvvvvvvvv vvvvvvvvvv vvvvvvvvvv vvvvvvvvvv vvvv vvvv
0x00, 0x2d, 0x53, 0x33, 0x06, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x01, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00
Your project helped me in programming my Java version, so I will add something new... In newer versions of CoDeSys there is a new setting Request on bootup/ Answer bootup request. When Answer bootup request is activated, the current value of the variable(s) can be requested through this. The data is in
CTelegramformat, but there are a few changes.Example: