Hi,

according to
http://linuxcnc.org/docs/2.7/html/man/man9/wj200_vfd.9.html
the wj200-wfd component already has a toggle output for use by a
watchdog. Then, there's a "watchdog" component:
http://linuxcnc.org/docs/2.7/html/man/man9/watchdog.9.html

So, your HAL will basically need something like

loadrt watchdog num_inputs=1
addf watchdog.0.process base-thread
addf watchdog.0.set-timeouts servo-thread

setp watchdog.0.timeout-0 0.1

net vfd-wdt wj200-vfd.0.watchdog-out => watchdog.0.input-0
net machine-en motion.enable-out => watchdog.0.enable-in
net vfd-ok watchdog.0.ok-out

HAL syntax and naming without warranty, as I'm just writing this from
memory and the quoted manpages.

Then you can connect vfd-ok to whatever you want (or whatever should
know if the VFD is responding). The watchdog timeout will need to be set
in accordance with the VFD update rate. For a userspace component, I'd
not go much below 100ms to avoid false-positives if a response takes a
moment longer to be processed.

Bye,
Philipp

On 29.02.2016 19:59, dan...@austin.rr.com wrote:
> Not a stupid question at all- I literally didn't do more than I said.  
> 
> I will try this ASAP.
> 
> Do you know how to handle a "watchdog" that continuously checks whether the 
> VFD is running?
> 
> Danny
> 
> ---- Philipp Burch <p...@hb9etc.ch> wrote: 
>> Hi Danny!
>>
>> On 29.02.2016 08:15, Danny Miller wrote:
>>> [...]
>>>
>>> loadusr -W wj200_vfd baud 19200
>>> #default slave address is 1
>>> setp wj200-vfd.0.mbslaveaddr 1
>>> setp wj200-vfd.0.commanded-frequency 60
>>> # connect to wj200-vfd pins
>>> net spindle-on wj200-vfd.0.run
>>> net spindle-cw wj200-vfd.0.reverse
>>> net spindle-at-speed wj200-vfd.0.is-at-speed
>>>
>>
>> Maybe it's a stupid question, but: Have you also connected the nets
>> spindle-on, spindle-cw and spindle-at-speed to the motion component?
>>
>> I.e. something like
>>
>> net spindle-on motion.spindle-on
>> net spindle-cw motion.spindle-forward
>> net spindle-at-speed motion.spindle-at-speed
>>
>> See: http://linuxcnc.org/docs/2.7/html/man/man9/motion.9.html
>>
>> Then, wj200-vfd.0.commanded-frequency is actually a pin, which you
>> can/should set dynamically as well:
>>
>> net spindle-rps motion.spindle-speed-out-rps-abs
>> net spindle-rps wj200-vfd.0.commanded-frequency
>>
>> Good luck!
>>
>> Bye,
>> Philipp
>>
> 

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to