Modbus write to register 8601 value 6,7.15

Dear community members, I am trying to write to modbus register to control a vsd via ModBus serial using raspberry pi and node red , i can read values from vsd but I do not know how to write to register containing multiple bits in one register i am using node-red-contrib-modbus flow

this is the info i have .
ADD= Modbus address 1 thru 127
Tbr= network speed baud rate 19.2
tFO= Format 8E1
trO= Timeout 10 seconds
Writing speed in RPM’s
CMD word is 8601 is the start and stop
CMD word is 8501 is the start and stop
To start the drive you write a Dec 6, then 7 then 15 to 8601 or 8501 ( Check for offset values)

CMD bit 0: = 1 : Switch on
bit 1: = 0 : Disable voltage
bit 2: = 0 : Quick stop/Emergency stop
bit 3: = 1 : Enable operation/Run command
bit 4: Reserved (set to 0).
bit 5: Reserved (set to 0).
bit 6: Reserved (set to 0).
bit 7: Fault reset/Fault acknowledgment active on 0 V 1 rising edge
bit 8: = 0 : RUN asked, 1 : STOP asked
bit 9: Reserved (set to 0).
bit 10: Reserved (set to 0).
bit 11: Direction of rotation command =
0: Forward rotation
1: Reverse rotation. Default value, this bit can be assigned to another command.
bit 12: Reserved (set to 0).
bit 13: Reserved (set to 0).
bit 14: Reserved (set to 0).
bit 15: Reserved (set to 0).

please guys any help would be appreciated thank you

Hi Guys i think it would be something like this but not sure how to adress each bit in register

inject node /////////////////////
msg.payload = [6,7,15];
return msg;
///////////////////////////////////////
function node /////////////////////////////
msg.payload = { value: msg.payload , 'fc': 5, 'unitid': 1, 'address': 8601 , 'quantity': 1 }
return msg;
/////////////////////////////////////////////////////////////////////
thank you

Hi,
try this as a starting point for your tests.

[{"id":"aeba0ad7.26add8","type":"modbus-response","z":"8057eee0.47ef7","name":"","registerShowMax":20,"x":650,"y":140,"wires":[]},{"id":"a46fe485.2e1ec8","type":"inject","z":"8057eee0.47ef7","name":"6 ?","topic":"","payload":"6","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":80,"wires":[["bbe1397b.961208"]]},{"id":"bbe1397b.961208","type":"modbus-write","z":"8057eee0.47ef7","name":"","showStatusActivities":false,"showErrors":false,"unitid":"1","dataType":"HoldingRegister","adr":"8601","quantity":"1","server":"98defed2.95a52","emptyMsgOnFail":false,"x":400,"y":140,"wires":[["aeba0ad7.26add8"],[]]},{"id":"6b3bdce4.baf964","type":"inject","z":"8057eee0.47ef7","name":"switch On","topic":"","payload":"7","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":120,"wires":[["bbe1397b.961208"]]},{"id":"70cd9d8c.e71454","type":"inject","z":"8057eee0.47ef7","name":"Run","topic":"","payload":"15","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":160,"wires":[["bbe1397b.961208"]]},{"id":"98defed2.95a52","type":"modbus-client","z":"","name":"","clienttype":"serial","bufferCommands":true,"stateLogEnabled":false,"queueLogEnabled":false,"tcpHost":"127.0.0.1","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"19200","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","unit_id":"1","commandDelay":"1","clientTimeout":"1000","reconnectOnTimeout":true,"reconnectTimeout":"2000","parallelUnitIdsAllowed":true}]

Hi, there thank you for the help i think we are on the right track but the drive still don't seem to start.

i will try changing setting on the ATV12 vsd....

H Rromele thank you for the help i got it to work by , by setting the FR1 value to modbus i can now stop, start and set speed .

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.