1
Brains Development / Out-put control word to sequential range of coils (Danfoss VFD)
« on: April 22, 2011, 07:48:53 AM »
HI Guys,
Iv'e watched the tutorials and read the Popper Bears brain guide but I still can't work out how to send to or read from multiple coils (16) in a brain.
It's got to be something easy that I am missing.
My Danfoss VFD has the control bits in coils 0-15 and the spindle speed setting bits in coils 16-31 (speed range 0h - 4000h). Coils 32-47 are the VFD status bits and then coils 48-63 are the spindle speed feed back bits.
Words are sent LSB first
I can control and read from the VFD in the Modbus test screen. The VFD can be stopped by addressing just one bit in the control word but will not start using that method. I have to write to the full 16 coils of the control word.
Each coil only accepts a 0 or 1.
I imagine the value in the brain would be a decimal representation of the binary word, but I don't know how to break that up for sending to the individual coils in one action.
Any pointers on reading 16 consecutive coils and processing them as a 16bit word, and/or sending a 16bit word to 16 coils?
Cheers,
Phil
Setup Images
Iv'e watched the tutorials and read the Popper Bears brain guide but I still can't work out how to send to or read from multiple coils (16) in a brain.
It's got to be something easy that I am missing.
My Danfoss VFD has the control bits in coils 0-15 and the spindle speed setting bits in coils 16-31 (speed range 0h - 4000h). Coils 32-47 are the VFD status bits and then coils 48-63 are the spindle speed feed back bits.
Words are sent LSB first
I can control and read from the VFD in the Modbus test screen. The VFD can be stopped by addressing just one bit in the control word but will not start using that method. I have to write to the full 16 coils of the control word.
Each coil only accepts a 0 or 1.
I imagine the value in the brain would be a decimal representation of the binary word, but I don't know how to break that up for sending to the individual coils in one action.
Any pointers on reading 16 consecutive coils and processing them as a 16bit word, and/or sending a 16bit word to 16 coils?
Cheers,
Phil
Setup Images