jianping.zhou
OpenPLC Runtime V4.0.3 (Windows)

My LD program is like the following images.

Global Variables:

[203128%2F9647812%2Fmceclip0]


LD Program (Debugger):

[203128%2F9647810%2Fmceclip0]
 
sw_on_off1 is an ON/OFF wave.
CTU can count up, and set the count to gcnt_i (%MW34). I can see the debbuger shows the count up result.
gcnt_i is converted to gcnt_dl (%MD40)==> gcnt_dlu (%MD44) ==> gcnt_lreal (%ML58) ==> gcnt_real (%MD48).
You can see in the image of the debugger that gcnt_dl, gcnt_dlu, gcnt_lreal and gcnt_real remain no change.
What's wrong with the settings, is it a bug in the Runtime?


Reply 0 0
thiagoralves
Looks like a bug on the debugger that is not polling properly globally variables. Can you read the registers from Modbus?
Reply 0 0
jianping.zhou
Modbus also can not read these (unchanged) registers.
Reply 0 0
thiagoralves
What addresses are you trying to read? What does your modbus server configuration look like? It is possible that you are reading the wrong addresses.
Reply 0 0
jianping.zhou
Thank you for the hint about Modbus address.
I have corrected the address for reading %MDn and %MLn,
python ModbusTcpClient can read %MWn, %MDn and %MLn registers now.

But the debugger still can not see the value of these registers.
Reply 0 0
thiagoralves
This is a debugger bug. Please create an issue here so this can get tracked and fixed: https://github.com/Autonomy-Logic/openplc-editor/issues
Reply 0 0
Reply