View Single Post
Old March 6th, 2018, 01:19 PM   #1
United States

Maxkling is offline
Join Date: Mar 2011
Location: Atlanta
Posts: 193
AD Click and GS2

Devices: AD Click and GS2 - modbus RS232

Need a bit of direction in regards to modbus write(send) instruction.

So far I have set up a read (receive) holding registers(3) with a modbus address of 408449(48449) for a length of 13. It works great and I am also using it to monitor the connection of the drive and plc. The instruction is being called from a rising edge of the 100ms clock (SC5).

So on to the write instruction. I am trying to use the vfd external fault to disable the drive (there is a separate safety circuit with an isolation contactor for an emergency stop). Pretty much the PLC is waiting for an input, once it receives the input it will start a timer. As the timer is timing the drive will be able to be operated via the keypad. The operator can start and stop the drive as well as adjust the speed as necessary (remote keypad).

So for the modbus write instruction, I check that the comm port is not in use, and will write single register (06) to address 402334 (42334) with a single word of either 0 or 1. So here is the problem, I can write a value of 0 to the register as many times as I want, I can write a value of 1 to the register only one time. EF will come up on the drive display and everything is good. But if I write to it again with a value of 1, It will get an error of "CE03" Comm Warning - Illegal data value. My initial logic was to write a 1 to the register constantly until its time for the drive to be used. This was because if I only wrote it one time, the operator could hit the stop button, clear the EF and run the drive. I'm now going down the road of comparing what the PLC wants the drive to do VS what state the drive is in. If there is a difference then, write the updated values to the drive.

My question is why can't I write constantly the same value (higher than 0) to a holding register. I have tried this with different registers and had the same outcome.
  Reply With Quote