From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I set up my timer/clock for a 17 bit synchronous encoder?

I am trying to get an output from a 17 bit Gray Code encoder. I need the position output for other projects.

Here is a list of equipment being used:

PCIe 6361

CP-850-17S-GC-CW encoder from Allied Motion

SCB-68

 

I am trying a 3 wire connection.

Clock + to PFI 12

Data + to AI 0

NSL - to +5 V

NSL+ to AI Gnd

Data - to AI Gnd

Clock - to D Gnd

 

I have used MAX to build clocking to the PFI 12 and can see the clocking. This is also what is coming out of my encoder. It does not apperar to synch up using continuos clocking.

I have tried to build a VI and use DAQmx with the same results.

When I tried to run N samples using 17 bits with a clock at 100KHz and an initial delay the signals, using an osciliscope, appear to be correct except that it does not change with the rotation of the encoder. The output of the encoder still appears to be the clock signal.

 

I have used other programs and they give the angle fine.

It may be I need to add something else and or set this up in sequence. If anyone can direct me to documentation I would greatly appreciate it.

I have added the documentation, from the website, for the CP850 17S GC encoder. This has the timing information. 

 

0 Kudos
Message 1 of 6
(5,952 Views)

          I have two questions for you.

-          Why did you choose to acquire the data signal using an analog input?

-          Could you explain a little more what are you getting in the output comparing it with the 3-wire picture in the attached pdf?

0 Kudos
Message 2 of 6
(5,923 Views)

I appologize for taking so long. I have been ill. I connected to an analog signal due to suggestions from others. I had planned to move it to a digital when I returned. I have grounded the NSL signal and I have put anything from 10KHz clock to 2MHz clock signal into the SCL. When this is done I am receiving, from the DOUT, exactly the signal going into the SCL. Thank you for your reply.

0 Kudos
Message 3 of 6
(5,914 Views)

Hi msmith

 

You are using a PCIe-6361, you could use that card also to acquire the same signals that you are generating. First you need to check that you are generating the signals as that encoder require, with the same PCI you can verify that. Then if you are generating the signals correctly, the enconder should has an output as shown in the graph in the datasheet, if not there is a problem in that enconder. 

 

*Other detail, I am not sure in this case but in other cases that I remember with other encoders, there is necesary to change the NSL from 1 to 0 for each value. You can try also to manipulate that input from the PCI-card.

 

Regards

0 Kudos
Message 4 of 6
(5,895 Views)

I have moved the encoder putout signal to PO.0 port. It appears I am getting the clock signal out. Nothing changes as the encoder is rotated. I believe I am not setting the clock up correctly. I am tying the NSL line low. I wonder if I need to have a nsample clock? I have tried many different clocking signals but no luck in getting the correct encoder output. I used DAQ to build a clock signal to the PFI12 port using cntr0. I maybe doing this incorrectly. Any advice would be appreciated.

0 Kudos
Message 5 of 6
(5,880 Views)

Hi msith

 

You can take advantage of your X series DAQ, because you can measure the clock that you are generating. You are saying that you were able to generate a clock signal with counter 0, so try to measure the waveform and the frequency  with your DAQ to verify if that signal is the expected signal. If it is, you work from the software is correct, Regards

0 Kudos
Message 6 of 6
(5,856 Views)