rs485 huanyang speed control
I have a very custom .hal, but at a point, I decided that I would need to backup my original .hal and .ini create a new ones with stepconf if I wanted the controls to show up. I did that, and merged the new stuff into a copy of the old files.
Still, the custom controls showing in the example weren't showing. I figured out how to add the .xml in the [Display] section of Axis's settings, then I had the speed indicator on the right.
Though the motor will not turn on, and I don't have the + - speed selectors.
So it seems that perhaps I have to this all over again, making some spindle speed settings in stepconf, but will this fix my problem?
Because I don't know RS485 is actually doing, I have no idea what to put in for speed settings. I don't know what settings actually apply to RS485 spindle control. Is PWM sent over RS285 or digital data, or is the PWM a breakout terminal pin thing?
What I would like to have is spindle control on/off and RPM from perhaps 6000-24000.
It would really be helpful if I had a known-good .hal and .ini that I could fish through.
Any help would be appreciated : )
Thanks for reading this far,
Brenda
Please Log in or Create an account to join the conversation.
Are you using Axis?
I have this in my HAL, I think it was to fool Axis into believing I had a spindle brake
net dummy motion.spindle-brake
The "magic" is these lines here:
github.com/LinuxCNC/linuxcnc/blob/master...cripts/axis.py#L3980
If your HAL file contains any of the pins in the "forget" function positions 1 onwards then the control in position 0 is enabled.
You might want to consider if that is clever or stupid in your GUI...
Please Log in or Create an account to join the conversation.
I guess it thinks I have no spindle, so I guess I have to do another round with stepconf, and then the merging, and the sorting, with the pointy teeth : P
And I don't have any idea what stepconf settings applies to the Huanyang VFDs. In the video Marco Reps just glosses over the spindle page in stepconf--not important : P I like his videos, though.
My thinking is: most people will have a milling machine with a spindle.
Oh, the Axis internal controls are written in different language than the external ones....
One of the shames about Axis is: nothing is anti-aliased--no Cairo?
Thanks,
Brenda
Please Log in or Create an account to join the conversation.
Back in the mists of time the HAL and INI had to be written from scratch. Stepconf and PnCCOnf are "wizards" that try to automate the process, but the HAL and INI are meant to be human-readable and are expected to be human-edited.
To put this in perspective, I wrote about half of the Mesa drivers, but I have never used PnCConf. (largely because I am nearly always working with new cards that PnCConf can't be expected to work with because _LinuxCNC_ doesn't work with them yet.)
Please Log in or Create an account to join the conversation.
I just don't know what form of communication is happening over RS285.
Is RS285 sending PWM or data?
To read the hy_vfd man page, I would think that it sends and read data to/from the VFD, but the spindle control code I've seen seems to deal with terminal PWM, so how can it work?
It appears that stepconf has a PDM option, will that help it's speed settings work for RS485
In general the thing missing from the LinuxCNC documentation is examples of use and a sense of how things fit together, a lay of the land. A user who does not understand the documentation enough to soldier through it cannot improve it, and they will come here to the forums.
This would be a swell place to include some Huanyang VFD information.
wiki.linuxcnc.org/cgi-bin/wiki.pl?VFD_Modbus
Please Log in or Create an account to join the conversation.
- InMyDarkestHour
- Offline
- User is blocked
- Posts: 701
- Thank you received: 111
www.ni.com/white-paper/11390/en/
There's the man pages
linuxcnc.org/docs/2.7/html/man/man1/hy_vfd.1.html
linuxcnc.org/docs/2.7/html/man/man1/hy_gt_vfd.1.html
And probably more info available by searching the forum.
Please Log in or Create an account to join the conversation.
The issue I am having is: having never seen working code, having never found anything that explains how the speed setting connect with HY VFD, this I am shooting in the quiet dark.
Noticing that the VFD driver was written to support a Huanyang GT just sent a chill down my spine.
Please Log in or Create an account to join the conversation.
I just don't know what form of communication is happening over RS285.
Is RS285 sending PWM or data?
It is sending numerical data. (it's a byte-based serial protocol, sending PWM would be weird. And also entirely possible)
To read the hy_vfd man page, I would think that it sends and read data to/from the VFD, but the spindle control code I've seen seems to deal with terminal PWM, so how can it work?
HAL is magic. Or close. Everything in HAL is just a number. Most of the important ones are floats. But you can convert them in HAL. Most simply with the dedicated functions like "conv_float_s32" but more subtly with things like the "PWM" HAL module that takes a floating-point spindle speed as input and outputs a bit-type output for connection to a digital pin.
In your case you would just not have the PWM component. Simply connect floating-point spindle speed command to the VFD component floating-point spindle-speed input.
Unless you need scaling.
Please Log in or Create an account to join the conversation.
- InMyDarkestHour
- Offline
- User is blocked
- Posts: 701
- Thank you received: 111
One young player had a bit of a problem, this thread discusses getting it going. Could be worth a read.
Please Log in or Create an account to join the conversation.
Though....
I cannot risk ruining a $420 vfd and spindle combination. I want to learn how to fish, but unless I see example code, I don't think I should proceed.
Please Log in or Create an account to join the conversation.