Wednesday 24 February 2021

Mesa and halrun - how to check hal pins

https://forum.linuxcnc.org/27-driver-boards/30453-mesa-5i25-7i77-first-steps?start=30 

To check everything separate from LinuxCNC open a terminal and:

halrun
loadrt hostmot2
loadrt hm2_pci
show pin


That will load everything with default settings. You should see the 7i77 and 7i71 pins listed.

From the manual: "In normal operation CR9 must always be on. At power-up, CR32 should be off and CR33 on. At power-up, the red LED CR33 indicates a watchdog fault, which is expected before host communications are established. Once running, CR32 should blink at about 1 Hz for a 1 KHz update rate, and CR33 should be off. In setup mode CR32 and CR33 are both illuminated."

The commands above will always give a watchdog fault on all cards, as there isn't even a realtime thread running. If you want to check that the watchdogs go off then follow the above with

loadrt threads
addf hm2_5i25.0.read thread1
addf hm2_5i25.0.write thread1
start


Note that you can use tab-completion to enter commands at the halcmd prompt, which saves typing and makes it more difficult to type typos.

You can use setp and getp to set and read HAL pins (and, in fact do anything else legal in a HAL file) at this point. Then type "exit" to finish.

No comments:

Post a Comment

Final assembly and test of the spindle nose adaptor - RESULT!!

After the recent distraction caused by the 3D scanner, resurrecting the 3D printer and buggering about with the throttle bodies for my Honda...