Hello All,
Nice forum you have here! I will preface this by saying I did try the search feature, but didn't find any help with what I need.
OK, so I am new to Mango and am trying to create a basic HMI for some of the MODBUS-enabled devices that my company sells. The issue I am having is the retention of Modbus values when writing to a control word using Mango.
Application Information:
IP Address: 192.168.0.100
Device ID: 192
Offset (0-based): 29921
Type: Holding Register
Data Type: 2 byte, unsigned
Issue:
The register in question (29921) is used to turn a motor on and off. Bit 0 of the word is 'Right rotation', bit 1 is 'Stop' and bit 2 is 'Left rotation'. A high bit in either bit 0 or 2 will rotate the motor as noted. A high bit in 1, regardless of bit 0 or bit 2, stops the motor. Commands to reverse the motor without first stopping the motor are ignored by the Modbus end-device.
Whenever I use the Datapoints utility screen and 'set' the desired value (1.0 or 4.0), either the motor turns on for a split second and shuts back off or it doesn't turn on at all, with the end result always showing the returned value of '2.0' (bit 1, the stop bit, as high).
If you're still with me, I am convinced this is a function code issue of some sort, possibly a watchdog timer issue. I know the Modbus device works as expected when using Modscan32 simulation software. More interestingly, if I run Modscan32 concurrently with Mango, I can set the desired value from Mango's Datapoints utility screen and the value seems to 'stick' or retain as I would expect it to. The motor will turn on and stay on indefinitely so long as Modscan32 is polling in the background. As soon as I disconnect Modscan32, the register jumps back to '2.0' and the motor subsequently shuts down. All of this said, the only thing Modscan32 was doing in my test setup was polling the same register and displaying the value on screen - I didn't use it to force/write any values.
I am asking for help IDing my problem, because, quite frankly, I am stuck. I played with all of the settings I could think of and still have no luck getting it to 'stick'. I changed the data type to binary and added three datapoints to try controlling each bit on it's own - same result. I also tried messing with the timeouts, refresh intervals, the 'write-type' of the register (both write-only and settable) and countless combinations thereof...
Any help with this would be greatly appreciated! Thanks!