rs485 huanyang speed control

More
28 Jun 2018 00:17 #112942 by BrendaEM
I am having issues with my Huanyang VFD and 24000RPM. It does not work. The usb device seems to be showing up.

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.

More
28 Jun 2018 00:37 #112943 by andypugh
The + / - speed buttons are not configured by stepconf per. se. They appear when the GUI thinks that there is a spindle to control.

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... :-)
The following user(s) said Thank You: BrendaEM

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

More
28 Jun 2018 00:56 - 28 Jun 2018 01:06 #112944 by BrendaEM
Yes, I am using Axis.

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
Last edit: 28 Jun 2018 01:06 by BrendaEM.

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

More
28 Jun 2018 01:30 - 28 Jun 2018 01:30 #112946 by andypugh
Maybe now is the time to decide that Stepconf has done its duty and its time to take charge of your HAL and INI yourself.

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.)
Last edit: 28 Jun 2018 01:30 by andypugh.

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

More
28 Jun 2018 01:51 - 28 Jun 2018 02:12 #112949 by BrendaEM
Well, as you know know most of my .hal is custom; you helped me with it : )

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
Last edit: 28 Jun 2018 02:12 by BrendaEM.

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

More
28 Jun 2018 02:08 - 28 Jun 2018 02:13 #112952 by InMyDarkestHour
RS-485 and the rest explained....it's data.
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.
Last edit: 28 Jun 2018 02:13 by InMyDarkestHour.
The following user(s) said Thank You: BrendaEM

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

More
28 Jun 2018 02:18 - 28 Jun 2018 02:20 #112954 by BrendaEM
I've seen serial protocol before.

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.
Last edit: 28 Jun 2018 02:20 by BrendaEM.

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

More
28 Jun 2018 02:19 - 28 Jun 2018 02:21 #112955 by andypugh

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.
Last edit: 28 Jun 2018 02:21 by andypugh.

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

More
28 Jun 2018 02:24 #112956 by InMyDarkestHour
forum.linuxcnc.org/24-hal-components/34617-mesa-modbus#111139

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.

More
28 Jun 2018 02:27 - 28 Jun 2018 02:28 #112959 by BrendaEM
Further down the line, it's nice to see that there are setting for min and max speed, so that's encouraging.

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.
Last edit: 28 Jun 2018 02:28 by BrendaEM.

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

Time to create page: 0.177 seconds
Powered by Kunena Forum