- Posts: 266
- Thank you received: 120
rs485 huanyang speed control
- BrendaEM
- Offline
- Elite Member
-
Less
More
8 years 4 months ago - 8 years 4 months ago #113117
by BrendaEM
Replied by BrendaEM on topic rs485 huanyang speed control
Thank you Andypugh, Clive S, and Curtisa,
Does the Hy spindle diver need classic ladder?
Presently, I am in this hellish loop. I need Stepconf because I have something missing in my .hal for the motor, but Stepconf will destroy my configuration, so I have to backup, Stepconf, sort, compare, edit, ad naseum.
Does the Hy spindle diver need classic ladder?
Presently, I am in this hellish loop. I need Stepconf because I have something missing in my .hal for the motor, but Stepconf will destroy my configuration, so I have to backup, Stepconf, sort, compare, edit, ad naseum.
- My .hal is (also) way custom to accommodate my stepfw/steprev motors.
- I don't know enough to invoke the modbus stuff to get it ready for the typical addition by Marco Reps.
- I don't know if classic ladder is needed.
- I likely I have needless PWM stuff in there from the original Stepconf .hal.
- Misc: My original .hal/ini is missing GUI stuff for the readout/control, which I may forgo if I can get it going.
Last edit: 8 years 4 months ago by BrendaEM.
Please Log in or Create an account to join the conversation.
- BrendaEM
- Offline
- Elite Member
-
Less
More
- Posts: 266
- Thank you received: 120
8 years 4 months ago - 8 years 4 months ago #113121
by BrendaEM
Replied by BrendaEM on topic rs485 huanyang speed control
Oddly, I got it going a little bit : )
I can turn on the motor, adjust the speed screen readout, but I can't yet raise the motor speed.
The motor is running pretty slow, at it's minimum, but at least they are communicating.
A Modbus GUI loads and drops out before LinuxCNC runs.
One of the culprits was a missing -r twittle in the following line before the baud rate. My ergonomics at the machine make me look back and forth, and I failed to notice a difference. I don't know how many times I've looked at this. Duh!
I still needed to add in the .ini the following in the [Display] section.
I thought it was missing one of these, but it's already connected:
ref:
forum.linuxcnc.org/24-hal-components/292...inuxcnc-2-7?start=30
Other than the VFD proper name is different, and that there are two nets on the same line, right now it looks similar...
....to some of the lines in the spindle block I have:
In the other thread there was some talk of speed scaling in the thread linked above, but I am not getting any change for my button-pushing effort, so I suspect I would be curing the symptom at this point. If I can create a speed change, then it was too low, then It would seem that scale would be just the thing.
I can turn on the motor, adjust the speed screen readout, but I can't yet raise the motor speed.
The motor is running pretty slow, at it's minimum, but at least they are communicating.
A Modbus GUI loads and drops out before LinuxCNC runs.
One of the culprits was a missing -r twittle in the following line before the baud rate. My ergonomics at the machine make me look back and forth, and I failed to notice a difference. I don't know how many times I've looked at this. Duh!
Code:
loadusr -Wn vfd hy_vfd -n vfd -d /dev/ttyUSB0 -p none -r 9600
I still needed to add in the .ini the following in the [Display] section.
Code:
PYVCP = custompanel.xml
I thought it was missing one of these, but it's already connected:
Code:
net spindle-cmd-rpm => spindle-vfd.speed-command
Other than the VFD proper name is different, and that there are two nets on the same line, right now it looks similar...
Code:
net spindle-speed-cmd motion.spindle-speed-out-abs => hy_vfd.command
net spindle-cmd-rps-abs <= motion.spindle-speed-out-rps-abs
net spindle-cmd-rpm-abs => vfd.speed-command
....to some of the lines in the spindle block I have:
Code:
loadusr -Wn vfd hy_vfd -n vfd -d /dev/ttyUSB0 -p none -r 9600
net spindle-cmd-rpm <= motion.spindle-speed-out
net spindle-cmd-rpm-abs <= motion.spindle-speed-out-abs
net spindle-cmd-rps <= motion.spindle-speed-out-rps
net spindle-cmd-rps-abs <= motion.spindle-speed-out-rps-abs
net spindle-cmd-rpm-abs => vfd.speed-command
net spindle-cw motion.spindle-forward => vfd.spindle-forward
net spindle-ccw motion.spindle-reverse => vfd.spindle-reverse
net on motion.spindle-on => vfd.spindle-on
net spindle-at-speed => motion.spindle-at-speed
In the other thread there was some talk of speed scaling in the thread linked above, but I am not getting any change for my button-pushing effort, so I suspect I would be curing the symptom at this point. If I can create a speed change, then it was too low, then It would seem that scale would be just the thing.
Last edit: 8 years 4 months ago by BrendaEM.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
-
Less
More
- Posts: 19899
- Thank you received: 4655
8 years 4 months ago #113128
by andypugh
Replied by andypugh on topic rs485 huanyang speed control
You don't need classic ladder to run the hy_vfd. That is a completely different way to run a modbus device than the hv_vfd HAL component.
I am _so_ tempted to just give a bunch of documentation links to prove that it is all there...
The vfd name is different because you have made it different in the loadusr line.
linuxcnc.org/docs/2.4/html/hal_basic_hal.html#r1_1_3
You are loading a component and waiting for "vfd" to be ready before continuing, then passing some parameters to the hy_vfd function, namely a name change (-n) a port name (-d) and a baud rate (-r) and a parity (-p)
So you could just use
or even set the VFD params to the hy_vfd defaults (38400 baud, odd parity) and use
In either case the hy_vfd pins would all be called "hy_vfd.pin-name"
In your HAL the lines
Should mean that the command signal is going to the VFD. You can check this with the halmeter (in the Machine menu with Axis and Gmoccapy, "loadusr halmeter" in a terminal in some other GUIs like Touchy)
If the speed command is changing then my suspicion is that PD002 isn't set to 2-communications port
BrendaEM wrote: ....to some of the lines in the spindle block I have:
Code:loadusr -Wn vfd hy_vfd -n vfd -d /dev/ttyUSB0 -p none -r 9600 net spindle-cmd-rpm <= motion.spindle-speed-out net spindle-cmd-rpm-abs <= motion.spindle-speed-out-abs net spindle-cmd-rps <= motion.spindle-speed-out-rps net spindle-cmd-rps-abs <= motion.spindle-speed-out-rps-abs net spindle-cmd-rpm-abs => vfd.speed-command net spindle-cw motion.spindle-forward => vfd.spindle-forward net spindle-ccw motion.spindle-reverse => vfd.spindle-reverse net on motion.spindle-on => vfd.spindle-on net spindle-at-speed => motion.spindle-at-speed
I am _so_ tempted to just give a bunch of documentation links to prove that it is all there...
The vfd name is different because you have made it different in the loadusr line.
linuxcnc.org/docs/2.4/html/hal_basic_hal.html#r1_1_3
You are loading a component and waiting for "vfd" to be ready before continuing, then passing some parameters to the hy_vfd function, namely a name change (-n) a port name (-d) and a baud rate (-r) and a parity (-p)
So you could just use
Code:
loadusr -W hy_vfd -d /dev/ttyUSB0 -p none -r 9600
Code:
loadusr -W hy_vfd -d /dev/ttyUSB0
In your HAL the lines
Code:
net spindle-cmd-rpm-abs <= motion.spindle-speed-out-abs
...
net spindle-cmd-rpm-abs => vfd.speed-command
If the speed command is changing then my suspicion is that PD002 isn't set to 2-communications port
The following user(s) said Thank You: BrendaEM
Please Log in or Create an account to join the conversation.
- BrendaEM
- Offline
- Elite Member
-
Less
More
- Posts: 266
- Thank you received: 120
8 years 4 months ago #113136
by BrendaEM
Replied by BrendaEM on topic rs485 huanyang speed control
Hi, in this instance and only in this one instance, I did figure out that the VFD was renamed in the loading line.
I used the same low baud rate as everyone else in holistic hope that it have a lower impact on latency elsewhere.
I will re-recheck the VFD PD002 speed command source, try commenting out classic ladder, and do some halmeter checking.
Thank you for your input. I am elsewhere on this forum asking for better docs with more examples. I appreciate what you have done for not only myself but others. I just think you shouldn't have to do so much of it : )
I used the same low baud rate as everyone else in holistic hope that it have a lower impact on latency elsewhere.
I will re-recheck the VFD PD002 speed command source, try commenting out classic ladder, and do some halmeter checking.
Thank you for your input. I am elsewhere on this forum asking for better docs with more examples. I appreciate what you have done for not only myself but others. I just think you shouldn't have to do so much of it : )
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
-
Less
More
- Posts: 19899
- Thank you received: 4655
8 years 4 months ago #113137
by andypugh
Replied by andypugh on topic rs485 huanyang speed control
Halmeter, Halscope and Halshow are extremely useful tools.
You can add them all to the HAL file too, if you want.
loadusr halmeter -s pin vfd.speed-command
For example will always load a small halmeter showing that pin.
I have a couple on my lathe config that are now irrelevant and annoying. I should remove them.
You can add them all to the HAL file too, if you want.
loadusr halmeter -s pin vfd.speed-command
For example will always load a small halmeter showing that pin.
I have a couple on my lathe config that are now irrelevant and annoying. I should remove them.
The following user(s) said Thank You: BrendaEM
Please Log in or Create an account to join the conversation.
- BrendaEM
- Offline
- Elite Member
-
Less
More
- Posts: 266
- Thank you received: 120
8 years 4 months ago - 8 years 4 months ago #113140
by BrendaEM
Replied by BrendaEM on topic rs485 huanyang speed control
I rechecked the VFD to make sure it is set to accept commands from the communication port.
I commented out the classic ladder stuff in the .hal. It runs no different, so at some point I guess I can remove it.
The Axis Spindle Override slider also has no authority over the spindle.
Oddly, the Axis Spindle Speed indicator reads from 0 to 3000. Hmm.
Probing HAL Meter signals while adjusting the spindle speed using the + and - ....
1.) The spindle-at-speed remains false.
2.) The spindle-command-rpm and spindle-command-rpm-abs jumps from 1 to 101 then progresses as increase to 3000 and beyond the GUI indicator. Interesting.
3.) The spindle-command-rps and spindle-command-rps-abs jumps from .016666x and progresses as increase. I am assuming that these are a rev per sec.
Looking at the VFD display as the motor is activated, the frequency remains at 110 hz (my chosen minimum) and the RPM at 6600.
I read what you wrote about frequency scaling, and perhaps the frequency needs to be scaled, but before I do that I will need to learn whether the VFD driver is sending frequency requests or RPM, and also look into why others have not had this problem.
I commented out the classic ladder stuff in the .hal. It runs no different, so at some point I guess I can remove it.
The Axis Spindle Override slider also has no authority over the spindle.
Oddly, the Axis Spindle Speed indicator reads from 0 to 3000. Hmm.
Probing HAL Meter signals while adjusting the spindle speed using the + and - ....
1.) The spindle-at-speed remains false.
2.) The spindle-command-rpm and spindle-command-rpm-abs jumps from 1 to 101 then progresses as increase to 3000 and beyond the GUI indicator. Interesting.
3.) The spindle-command-rps and spindle-command-rps-abs jumps from .016666x and progresses as increase. I am assuming that these are a rev per sec.
Looking at the VFD display as the motor is activated, the frequency remains at 110 hz (my chosen minimum) and the RPM at 6600.
I read what you wrote about frequency scaling, and perhaps the frequency needs to be scaled, but before I do that I will need to learn whether the VFD driver is sending frequency requests or RPM, and also look into why others have not had this problem.
Last edit: 8 years 4 months ago by BrendaEM.
Please Log in or Create an account to join the conversation.
Time to create page: 0.196 seconds