STEMAPPLICATIONS
Member
I have had to write my own Modbus ASCII "driver" for an old DL05 talking to a GS4. I am using the Modbus Slave program for testing. A PID is putting out data in decimal numbers (0-9) (I know that the PLC memory is really native BCD) and I am taking that and plugging it into my to my Modbus "driver". It works.. sort of. The Modbus Slave which I assume is going to be the same as the GS4, takes my decimal values and converts them to hex when receiving and stops accepting values in certain ranges.
I am incrementing the data by 1 and transmitting to test but this is the problem I get:
Slave stops accepting over a range of 216 to 312 (and other ranges too)
Rx:001995-3A 30 31 30 36 32 30 30 31 30 30 44 37 30 31 0D 0A
Tx:001996-3A 30 31 30 36 32 30 30 31 30 30 44 37 30 31 0D 0A
Rx:001997-3A 30 31 30 36 32 30 30 31 30 30 44 38 30 30 0D 0A
Tx:001998-3A 30 31 30 36 32 30 30 31 30 30 44 38 30 30 0D 0A
Stops:
Rx:001999-3A 30 31 30 36 32 30 30 31 30 30 44 39 0F 46 0D 0A
Rx:002000-3A 30 31 30 36 32 30 30 31 30 30 44 41 0F 45 0D 0A
Rx:002001-3A 30 31 30 36 32 30 30 31 30 30 44 42 0F 44 0D 0A
etc.
Rx:002092-3A 30 31 30 36 32 30 30 31 30 31 33 36 0A 31 0D 0A
Rx:002093-3A 30 31 30 36 32 30 30 31 30 31 33 37 0A 30 0D 0A
Start again:
Rx:002094-3A 30 31 30 36 32 30 30 31 30 31 33 38 39 46 0D 0A
Tx:002095-3A 30 31 30 36 32 30 30 31 30 31 33 38 39 46 0D 0A
So I don't know how or can't find on this old DL05 with no iBoxes how to convert the decimal values to equivalent hex values before running it through the "driver".
Also, I suspect there's no way on the GS4 that it would accept decimal values and NOT turn them into hex.
Help anyone?
I am incrementing the data by 1 and transmitting to test but this is the problem I get:
Slave stops accepting over a range of 216 to 312 (and other ranges too)
Rx:001995-3A 30 31 30 36 32 30 30 31 30 30 44 37 30 31 0D 0A
Tx:001996-3A 30 31 30 36 32 30 30 31 30 30 44 37 30 31 0D 0A
Rx:001997-3A 30 31 30 36 32 30 30 31 30 30 44 38 30 30 0D 0A
Tx:001998-3A 30 31 30 36 32 30 30 31 30 30 44 38 30 30 0D 0A
Stops:
Rx:001999-3A 30 31 30 36 32 30 30 31 30 30 44 39 0F 46 0D 0A
Rx:002000-3A 30 31 30 36 32 30 30 31 30 30 44 41 0F 45 0D 0A
Rx:002001-3A 30 31 30 36 32 30 30 31 30 30 44 42 0F 44 0D 0A
etc.
Rx:002092-3A 30 31 30 36 32 30 30 31 30 31 33 36 0A 31 0D 0A
Rx:002093-3A 30 31 30 36 32 30 30 31 30 31 33 37 0A 30 0D 0A
Start again:
Rx:002094-3A 30 31 30 36 32 30 30 31 30 31 33 38 39 46 0D 0A
Tx:002095-3A 30 31 30 36 32 30 30 31 30 31 33 38 39 46 0D 0A
So I don't know how or can't find on this old DL05 with no iBoxes how to convert the decimal values to equivalent hex values before running it through the "driver".
Also, I suspect there's no way on the GS4 that it would accept decimal values and NOT turn them into hex.
Help anyone?