connecting to hy vfd

More
25 Jul 2017 16:19 #96397 by Hippy
connecting to hy vfd was created by Hippy
Norbert great GUI.....

I am attempting to connect gmoccapy with a hy vfd. I have made all the HAL connections that I think are required by both gmocappy and the hy vfd.
But i have to be missing something as i have no feedback from the hy vfd, nor can i start or stop the spindle inside the gmoccapy.( i can start/stop it via halcmd )
.I am sure I am missing a connection to some gmoccapy pins that i need to make somewhere but i am lost as to what ones they are.
So any help would be greatly appreciated. Have attached all my HAL configs.
Attachments:

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

More
25 Jul 2017 16:58 - 25 Jul 2017 17:03 #96399 by newbynobi
Replied by newbynobi on topic connecting to hy vfd
Hallo Hippy,

could you please test the following:

your custom.hal
# HY VFD Controls
loadusr -W hy_vfd -d /dev/ttyUSB0 -p odd -r 19200

net hy-fwd             motion.spindle-forward    =>   hy_vfd.spindle-forward
net hy-rev             motion.spindle-reverse    =>   hy_vfd.spindle-reverse
net hy-on              motion.spindle-on         =>   hy_vfd.spindle-on
net spindle-cmd        motion.spindle-speed-out  =>   hy_vfd.speed-command

net spindle-at-speed   motion.spindle-at-speed 

your postgui.hal
# VFD
net hy_RPM  hy_vfd.spindle-speed-fb => gmoccapy.spindle_feedback_bar
net hy_Speed  hy_vfd.spindle-at-speed => gmoccapy.spindle_at_speed_led

# Tool Change
net tool-change        gmoccapy.toolchange-change   <=  iocontrol.0.tool-change 
net tool-changed       gmoccapy.toolchange-changed  <=  iocontrol.0.tool-changed
net tool-prep-number   gmoccapy.toolchange-number   <=  iocontrol.0.tool-prep-number
net tool-prep-loop     iocontrol.0.tool-prepare     <=   iocontrol.0.tool-prepared

net tooloffset-x       gmoccapy.tooloffset-x        <=  motion.tooloffset.x
net tooloffset-z       gmoccapy.tooloffset-z        <=  motion.tooloffset.z

setp hy_vfd.enable 1
# that one will work, but IMHO it is better to be connected to motion.motion-enabled
# like this
# net  motion.motion-enabled  =>  hy_vfd.enable   
# this way the spindle will be disabled if the machine is off

You should not have "direction marks" to the signal names.
And there was no connection to motion.spindle-speed-out

Please open halshow (settings page most right button) and watch for the following pin:
motion.spindle-speed-out
motion.spindle-at-speed
motion.spindle-forward
motion.spindle-reverse
motion.spindle-on
motion.motion-enabled

Report about the results.
It may be we still need a scale to calculate from rps to rpm, but that depends on your VFD

Norbert
Last edit: 25 Jul 2017 17:03 by newbynobi.

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

More
25 Jul 2017 17:41 #96404 by Hippy
Replied by Hippy on topic connecting to hy vfd
Norbert great job....I can now control the spindle on & off, but i do not get anything on the tach gauge that is loaded in vcp_box.hal_meter1 ( i think i remember trying to connect this but got some error so i skipped it )

I will watch the pins above and report back

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

More
25 Jul 2017 18:46 #96407 by newbynobi
Replied by newbynobi on topic connecting to hy vfd
PyVCP is not supported by gmoccapy, you need to use GladeVCP!

But the tacho is not needed, as you should get a value on the feedback bar.

Norbert

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

More
25 Jul 2017 19:39 #96414 by Hippy
Replied by Hippy on topic connecting to hy vfd
The vcp_box.hal_meter1 is not yours? Swore i pulled it off of one of your sim files, but maybe not.
It is made in Glade that i know.
I dont have any PyVCP stuff.
I do get value on the feedback bar and thats much better then earlier today ( thanks a ton ) but i like gauges.
It's no big deal it is something i can figure out while tweeking some other things...

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

More
25 Jul 2017 20:56 #96421 by newbynobi
Replied by newbynobi on topic connecting to hy vfd
Ok, if it is a GladeVCP widget it will work, it might be from my sim configs. You can connect its inpuf pin to the speed signal. But you will need to load the panel with its own hal file and do the connection in that file!

The load order is
Main hal files
Postgui hal files
Embedded tab hal files

If you get problems, just ask with some more details.

Norbert
The following user(s) said Thank You: Hippy

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

Moderators: newbynobiHansU
Time to create page: 0.088 seconds
Powered by Kunena Forum