Testing Mesa 5i25 with 5i25_7i76x2 Setup

More
01 Dec 2022 12:08 #258206 by holziCNC
Hello everyone,

I am setting up a LinuxCNC system with a Mesa 5i25 and a single Mesa 7i76 to control a CNC machine.
The 5i25_7i76x2.bit is flashed on the card and I have configured a basic setup with pncconf. 
Before i plug everything together im would like to measure one of the STEP or DIR signals to confirm it is working.
Is it possible to measure this at the DB25 connector ( e.g. PIN 1) without connecting to 7i76, dose the system need the serial connection to 7i76 to put out the signals?

I have already tried but i couldn't see a signal on any STEM or DIR pin of DB25 while jogging the axles in LinuxCNC.
For measuring i used a logic analyser. 

Would be cool if somebody knew if that should work so i know where to search my error.   

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

More
01 Dec 2022 14:58 #258216 by PCW
You can measure the step/dir signals at the DB25 connector, the serial interface
is only used for the field I/O

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

More
01 Dec 2022 15:29 #258220 by holziCNC
So the Software dosen't check the Serial connection before enabling the steppers as some kind of safety feature?

Then my fault musst be somewhere in my config.

Thanks for the fast reply.

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

More
01 Dec 2022 16:03 #258225 by PCW
If you use any field I/O in your configuration, LinuxCNC will not start
if the field I/O hardware is not detected.

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

More
02 Dec 2022 13:57 #258315 by andypugh
You are unlikely to see a step pulse with a meter, you would need an oscilloscope.

If I was wanting a low-level test like this I would simplify down to the very basics and use "halcmd" at the command-line.
halrun
loadrt hostmot2
loadrt hm2_pci
loadrt threads
addf hm2_5i25.0.read thread1 {use tab-completion to get the right function names here) 
addf hm2_5i25.0.write thread1
start

At this point, if all it well, the 5i25 should show signs of life (though if it is inside the case you probably won't be able to tell)

You can list all the HAL pins
show pin

And there are a couple that can show that things are working OK, the on-card user LEDS.
setp hm2_5i25.0.led.CR01 1
setp hm2_5i25.0.led.CR01 0

Should turn an LED on and then off again.

You can now start a stepgen running at a constant rate.
hm2_5i25.0.stepgen.00.control-type 1 {set to velocity mode}
setp hm2_5i25.0.stepgen.00.velocity-cmd 10
setp hm2_5i25.0.stepgen.00.enable 1

Should set the stepgen running at 10 pulses per second.

To make sure it is running:
loadusr halmeter pin hm2_5i25.0.stepgen.00.counts

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

More
02 Dec 2022 13:58 #258316 by andypugh
Oh, and when you are done, "exit" will dismantle the realtime environment and exit the halcmd prompt,

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

More
06 Dec 2022 21:20 #258745 by holziCNC
Verry helpful!!

I guess my Logik Analyzer is crap. I will try the oscilloscope tomorrow. 
But turning on LED does work. 

 

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

More
06 Dec 2022 21:39 #258750 by PCW
You can set the step_type to 2:

setp hm2_5i25.0.stepgen.00.step_type 2

To have quadrature outputs rather than step/dir

Then you would have a 10Hz square wave on
the step and dir pins, which is easier to see with an LED.

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

Moderators: PCWjmelson
Time to create page: 0.214 seconds
Powered by Kunena Forum