Modbus Only Writes Zeros

More
17 Jul 2020 23:29 #174977 by billnixon
I am trying to learn to use Classicladder's modbus. I am receiving the modbus communication on a slave simulator. When I start LinuxCNC, classicladder opens first and begins to communicate with the slave, but it only writes zeros. I tried assigning values to %QW1, but it still only writes a zero. I tried connecting a switch to an input, %I1, in hal, and then connect %I1 to %Q1 in classic ladder, then write %Q1 to a coil with modbus, but pressing the switch doesn't affect what modbus writes.

Here are some more potential clues:

My LinuxCNC gui does not open until I close classicladder. Once I do, the modbus communication stops.

If I open classicladder from the gui's menu, there is still no modbus communication, but the ladder rungs turn pink when I depress the switch I mentioned above. (The rungs do not turn pink when classicladder opens by itself before my LinuxCNC gui opens.)

If I open my gui while hiding the classicladder gui with --nogui, there is no modbus communication.

I'm not seeing any errors.

I am running version 2.8.0~pre1 with a qtpyvcp gui on Linux Mint 19.2 Cinnamon.

I attached my ladder file and my custom hal file
Attachments:

Please Log in or Create an account to join the conversation.

More
18 Jul 2020 00:37 - 18 Jul 2020 00:37 #174989 by cmorley
Replied by cmorley on topic Modbus Only Writes Zeros
The w is lowercase should be uppercase:
loadusr -W classicladder --modmaster atc.clp

Lowercase means wait till the program ends, upper means wait till ready and continue.
Last edit: 18 Jul 2020 00:37 by cmorley.

Please Log in or Create an account to join the conversation.

More
18 Jul 2020 01:11 #174990 by billnixon
Replied by billnixon on topic Modbus Only Writes Zeros
Thank you so much! That fixed it!

Please Log in or Create an account to join the conversation.

More
18 Jul 2020 07:04 #175021 by cmorley
Replied by cmorley on topic Modbus Only Writes Zeros
Excellent. It's unfortunate that we didn't chose a different letter rather then case for this behavior - caught me a few times too.

Please Log in or Create an account to join the conversation.

Time to create page: 0.135 seconds
Powered by Kunena Forum