using Classic ladder to setup controls for invertek VFD

More
05 Feb 2023 06:37 #263739 by gerrg
Hello! I just got a new VFD (old one died), and i'm trying to get linuxCNC to control it. I've got a the classic ladder part of it setup correctly as far s the CPL file goes (i think at least), but i'm now unsure how to actually link those registers from classic ladder to the signals on linuxCNC. I'm starting off using files from the YL VFD config stuff  here , but then i'm not sure how to actually access the values from classic ladder. Here's a picture of my classic ladder setup screen:


so the first line should be reading some values like motor speed, motor current, etc. Line 2 should be "Run Enable" (setting bit 0 high enables the spindle). Line 3 should be setting the spindle speed (in Hz I think, where a value of 1000 = 100.0 Hz)

I installed modpoll on the linux computer so i could send modbus commands through the rs485 connection i'm using (usb to rs485), and I'm able to turn the spindle on by setting register 1 to a value 1, and turn it the spindle off by setting a value of 0 as expected, and I can change the speed of the spindle by setting register 2 to a value of 1000 or 1100 (100Hz/6000RPM and 110Hz/6600RPM respectively)

so i guess my question is how can i set these register values from classic ladder to nets. the example link up at the top of this post for the YL VFD has lines like
net spindle-on          classicladder.0.in-00   spindle.0.on

net spindle-brake       classicladder.0.in-01   spindle.0.brake

net spindle-forward     classicladder.0.in-02   spindle.0.forward

net spindle-reverse     classicladder.0.in-03   spindle.0.reverse

net spindle-cmd-rpm     <= spindle.0.speed-out

net spindle-cmd-rpm-abs <= spindle.0.speed-out-abs

net spindle-cmd-rps     <= spindle.0.speed-out-rps

net spindle-cmd-rps-abs <= spindle.0.speed-out-rps-abs classicladder.0.floatin-00

... but i'm not really sure what those are meaning. I maybe classicladder.0.in-00 is the first value read from the first classic ladder register (assming that first register is reading multiple values).... but then classicladder.0.floatin-00 i would think would reference a floating point value of that same register value, so i'm getting confused

Any help sorting this out would be appreciated! Thanks!
Attachments:

Please Log in or Create an account to join the conversation.

More
06 Feb 2023 12:46 #263816 by andypugh
I have never used CL, so this is a guess, but I would imagine that you need ladder rungs that connect the HAL pin values as inputs to the Modbus outputs.

Please Log in or Create an account to join the conversation.

More
12 Apr 2023 10:57 #268883 by M4MazakUser
I wish I could remember what I learnt 12 years ago... I'm setting up modbus to set a speed on a vsd and have just spent all day !

Please Log in or Create an account to join the conversation.

More
12 Apr 2023 11:17 #268885 by andypugh
Do you want to spend even more time in experiimentation using a new and undocumented HAL component?

Are you using a Mesa card with a spare RS422 port?

Are you not really all that interested in getting the VFD to work?

If the answer to all these questions is "Yes" then:

github.com/andypugh/mesa_modbus

Please Log in or Create an account to join the conversation.

More
12 Apr 2023 14:46 #268900 by scotth

Please Log in or Create an account to join the conversation.

More
26 Apr 2023 11:34 #269969 by M4MazakUser
I worked out mine, once I worked out that the 4 wire usb-rs485 had to be a 2 wire unit as even with the positives and negatives bridged it was echoing.
then communication was easy except for the fact that the binary values in the manual were upside down.  This made it hard to work out which was the high and low word...the ladder bit is easy. Its just setting values from halui to the drive. - as its all s32 not float the conversion for speed (as its 2:1) has to be done using integers, therefore you divide and subtract by the amount of division.

Please Log in or Create an account to join the conversation.

Time to create page: 1.210 seconds
Powered by Kunena Forum