STEMApps (Customer) asked a question.
This involves a GS4 VFD but is definitely a PLC issue.
DL05 D0-05DD CPU Ver 2.90 Gate Array ver 1.0
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?
ATH - ASCII to Hex converts a table of ASCII values to a specified table of HEX values
https://cdn.automationdirect.com/sta...s/gs3m/ch5.pdf
https://cdn.automationdirect.com/sta...gs4m/appxd.pdf
The above references may help you out.
I would read one of the addresses like the Acceleration. Then change it manually to 9.95 and then read it again. The format that the data coming back to you will then tell you how you should write to it.
I hope this helps you out.
Regards,
__________________
Garry
https://www.accautomation.ca
Connect with us on Facebook: facebook.com/accautomation/
Thanks for taking the time to reply.
Got the conversion from Decimal to hex solved. Added a BIN to change 200 decimal to C8, then process the LRC and ASCII conversion. Thanks to DeanM for the support on the phone.
Now I've got a problem with my LRC calc that is still making it "skip" as above. Working on that. There's a lengthy thread about the LRC generation here:
http://www.plctalk.net/qanda/showthread.php?p=849458