Hello Guest it is April 25, 2024, 07:25:45 PM

Author Topic: Out-put control word to sequential range of coils (Danfoss VFD)  (Read 7111 times)

0 Members and 1 Guest are viewing this topic.

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

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Out-put control word to sequential range of coils (Danfoss VFD)
« Reply #1 on: April 26, 2011, 08:33:54 AM »
basically, your set up the manufacture burns up an entire register for just one On/Off bit. Instead of bit packing that register, and that is ok.

What your going to end up having to do, is look at the Local var addresses of each config, that correspond with that command or other funciton. and get that group,
and AND them to read their state. To Set commands, is going to be a different issue at least in Brains. Depending on the status you read, you will need to set Local Vars as your congtorl vars, and then depending on their states and mach3's state (i.e. M3/4, M5 spindle %dro etc.), you will need to set individual output rungs to your control coils going back out to your VFD.  It is going to be a Stone-Cold PIA to do what you want via Brains........ it can be done, but your sanity may be in question when/if you get it done........

In this case, I would do a combo Brains/VB (run the VB in the macropump).  Since all your spindle stuff is Bits, (except stuff like rpm and load and a few others), I would read/write to User LEDs, and User Dros, and do ALL your complex interlocking logic in VB, then I would just have Brains look at the ULEDs and UDROs and map that into or outof the modbus addresses. Not a real elegant solution, but MUCH easier to do..........  You will have to do some kind of Brains/VBmacropump to handle all the stuff your brining in, making decision on, and sending out.  NOTE: If you just want the most basic spindle control, then you DON'T need all that stuff you listed!!!  All that stuff is really only useful if your going to do a "High End" interface with complex controls and diagnostics.

scott
fun times
Re: Out-put control word to sequential range of coils (Danfoss VFD)
« Reply #2 on: April 26, 2011, 09:27:01 AM »
Thanks Scott,
I'll report back with what I end up using. A bit more research on Mach variables to do and then hit the issue head on.
Thanks for the pointers.
Cheers,
Phil
Re: Out-put control word to sequential range of coils (Danfoss VFD)
« Reply #3 on: August 29, 2013, 09:20:10 PM »
Majorstrain,

How did your VFD turn out.  It seems to me that you might the same type of communications as my Emerson SK commander Drive.  Send full control words and status words.  My is with modbus tcp or modbus rtu.  Anxious to hear how you turnout.  Maybe some setup screens, VB, and Brains.  Thanks.

Brooks Nelson