drbitboy
Lifetime Supporting Member
I will implement those now. I was having a few issues last night, the CCW was going high before CW. I solved that issue though. I will try it as soon as i get this uploaded to the PLC.
I'm also having trouble controlling X8 with modbus as well as reading y005 when there is a fault. Is it possible to read and write to coils without having physical wires present? or do i need to run those wires to the correct pins?
I don't think you should be able to write to X008 with Modbus, because it is a discrete input; you should only be able to read it. Are you using Modbus to trigger something, or are you trying to overwrite a value into the discrete input?
I need a start tool change signal-Tool change finished(which is X008).
I don't think this is right. X008 is an input, so (1) it can't be an output to indicate [Tool change finished], and (2) it cannot be written to via Modbus. Yes, you could move some of these items internally to Cx bits, especially if you want to stop the turret on stall OR e-stop events. A stall event is detected by the code i.e. when the stall timer (T3 TOF) expires (T3 has a falling edge) and the brake is released. An e-stop event would be a discrete input i.e. operator hits an e-stop button. If you are trying to use Modbus to simulate/override these signals because there are wires to inputs yet, then you will need an input buffer section to combine (probably OR) the inputs with Modbus-controlled bits (again, Modbus cannot write to inputs), and then use the ORed results where you are using the inputs now.
Actually, I am not sure what your X008 is supposed to do; it looks like all it does is start the stall timer, so I assume you send it when the Modbus master sends a new target. But you could just as easily use a rising edge of [Motor CW] to start the stall timer i.e. when a new target position is received that is not equal to the current position, then the motor will start turning the turret clockwise, and that indicates the start of the move sequence, so you could use that rising edge of Motor CW to start the stall timer.
Y005 is a read/write discrete output i.e. coil, so I would think you can read it using Modbus Function Code 1.
Last edited: