Been having some issues with a certain brand of device over modbus RTU rs485, so I figure I would try to change some of the com port settings real time using DEVWRITE and DEVREAD to see if that fixed the problem and in doing so I think I ran into a bug or I am using the instruction wrong. When writing to the comm port using DEVWRITE I see the changes populating in my DEVREAD but when I go into the comm port static settings the changes did not take place?? I tried stopping the controller and starting it back up, but that did not fix the issue. Any thoughts?
As for the comm. problem it still lingers no weird actions it'll work for weeks and than out of nowhere the device just stops communicating, to get the device communicating again I have to cycle it's power. Attached is the code if anyone would like to make some suggestions on it and also the bug.
SG Communication.S0
MRX @Rotork_Comm 0 0 5 3 1 5 V100 0x0 0 0x101 Communication.S1 Communication.S4 DST511
SG Communication.S1
TMR T4 2000
RST C2
STR T4.Done
JMP Communication.S2
SG Communication.S2
MWX @Rotork_Comm 0 0 5 6 7 1 V105 0x0 0 0x101 Communication.S3 Communication.S5 DST511
SG Communication.S3
TMR T24 2000
RST C3
STR T24.Done
JMP Communication.S0
SG Communication.S4
TMR T28 2000
SET C2
STR T28.Done
JMP Communication.S2
SG Communication.S5
TMR T29 2000
SET C3
STR T29.Done
JMP Communication.S0
#BEGIN MEM_CONFIG
Communication PROGRAM 0 -1
#END
#BEGIN ELEMENT_DOC
"V100","ACT1_WRDtoBITS","",""
"C2","ACT_Rx_Alarm","",""
"C3","ACT_Wx_Alarm","",""
"V105","ACT1_DsrdPos","","0-1000"
#END