Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Quad Encoder with 1426, reverse direction

Hi,

 

I run into a funny problem. I am using a PCI 1426 board (long story, it must be in a PCI machine, no PCI Express) with a line camera. I supply a quad differential encoder on the encoder input. So far so good. It even works as long as I move the axis forward. Unfortunately, I have to take images in both directions.

 

It would be trivial to solve this if I could set the encoder input polarity. Unfortunately, this is not supported on the 1426. The encoder scale is unsigned so something like scaling by -2 is not possible, either.

 

The encoder is a real encoder, thus, I can not change the polarity/direction in real time from software.

 

Is there any way out? Sure, I could add some electronics that can change the polarities in real time but that would be a last resort...

 

A less critical quation: So far this only worked using the external trigger output of the board (wiring it to the trigger input of the camera).  It would be nicer to trigger over the camera link CC1 line. I tried

 

imgSessionLineTrigSource2(Sid, IMG_SIGNAL_SCALED_ENCODER, 0, IMG_TRIG_POLAR_ACTIVEH, 0)

 

but  it does not work (using the "Trigger Each Line with Encoder" example project). Using imgSessionTriggerDrive2 in the same code I could send triggers, based on the encoder to the external lines. Am I missing something obvious? This is not mission critical as the trigger cable is already in and it works.

 

An alternative is to configure CC1 line source to External Trigger 0 but in that case what is imgSessionLineTrigSource2 supposed to do?

 

Thanks,

 

Gyula

 

 

0 Kudos
Message 1 of 2
(3,600 Views)

Is something from here helpfull to you?

 

http://digital.ni.com/public.nsf/allkb/A7F0388A2F9C8B7886257854004A65D7

http://digital.ni.com/public.nsf/allkb/38E46AE6989321EA8625799F0061832B

http://forums.ni.com/t5/Machine-Vision/How-to-route-Quadrature-Encoder-signal-to-CC1-using-PCIe-1429...

 

I believe what your are looking for is the IMAQ Generate Pulse3.VI. This VI will generate a pulse from the camera on a trigger line. You can change the Units parameter in the Pulse Parameters input to Scaled Encoder in order to generate their scaled encoder pulses.

 

An example of how to use this VI can be found in the example finder. It is called LL Pulse Generation.VI. You can find it in the Example Finder by going to Hardware Input and Output>>IMAQ>>Signal Input and Output>> LL Pulse Generation.VI.

 

However the encoder signal needs to be routed. This can be done in the camera file, or in MAX. Your can follow this Developer Zone to route the signal. Specifically look at Part 2: Configure the Camera and DAQ Device in MAX, step 10.

 

 

Was this somehow helpfull for you?

If no, please tell me what type of encoder do you use and what is your final application - what do you want to achieve and why.

 

 

B/R

 

Jozef Lipták
0 Kudos
Message 2 of 2
(3,523 Views)