On 6 June 2012 18:45, Brian May <bri...@do-precision.com> wrote:
> I think it is probably beyond my capabilities to get the parameters...

I can think of one way to do it, if they are available as parameters.

It is possible to run G-code when a GladeVCP button is pressed
http://www.linuxcnc.org/docs/2.5/html/gui/gladevcp.html#_the_action_mdi_toggle_and_action_mdi_widgets
(You can also do this with PyVCP using MDI_COMMAND in the INI)

G-code can set the values of HAL pins. M68 sets the values of the
motion.analog-out-NN pins.

So, a GladeVCP button can call an O-word sub which reads the #5520
value and sets the analog-out pins accordingly.

O100 IF [#5220 EQ 1]
M66 E0 Q#5221
M66 E1 Q#5222
…
O100 ENDIF
O101 IF [#5220 EQ 2]
M66 E0 Q#5241
M66 E1 Q#5242
…
O1010 ENDIF
…

Then, by net-ing those motion.analog-out-NN pins to the GladeVCP
displays, you can have a button that updates the display.

Alternatively. If you prefer not to press a button to trigger the
update, you could (for example) use MDI_COMMAND and link that pin to,
for example, an edge detector on halui.joint.N.is-selected or2-ed
together for all axes. Then it would update whenever you changed the
selected axis (for example every time the jogged axis changed)

-- 
atp
If you can't fix it, you don't own it.
http://www.ifixit.com/Manifesto

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to