Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading SSI absolute encoder with USB-6008 DAQ

Highlighted

The DAQmx VIs are installed with the DAQmx Driver.  For LabVIEW 2012, you'll need at least DAQmx 9.5.5 (according to here)--DAQmx 9.7 is the latest though.  However, installing DAQmx 9.7 (or 9.5.5) will replace whatever version you have currently installed and there is no support for LabVIEW 8.6 in DAQmx 9.7 (or 9.5.5), so if you still need to do development in LabVIEW 8.6 but want to try out 2012 I would find another computer/image to install LabVIEW 2012 on with an appropriate version of DAQmx (annoying, right?).

 

Please find attached the 2 VIs I posted saved for LabVIEW 8.6.

 

 

Best Regards,

John Passiak
Download All
0 Kudos
Message 21 of 49
(1,895 Views)
Highlighted

Hello John: thanks a lotttt  for your so prompt  reply. I will try the Labview 8.6 with your vi. With great appreciate to you.

Best regards,

Boborain

0 Kudos
Message 22 of 49
(1,886 Views)
Highlighted

Hello John:  I run the Labview 8.6 vi you post for me, but I want to confirm with you some issues.

  1.  Since my encoder is 12 bits, so I just change the Number of data bits from 10 to 12, nothing else, it will work well for my 12 bits absolute encoder, right?
  2.  And also, I want to get the 2D continuous time-angle output, but the current structure only output one static value when I click, how can I realize it?
  3. I want to get the continuous angle value so I click the acquisition button continuously and to observe the value, but the value suddenly changes so much sometimes. It's obviously wrong because the axis rotate smoothly. Do  you think it's the problem of hardware or software?

Thank you very much for your help!

Best regards,

Boborain

0 Kudos
Message 23 of 49
(1,882 Views)
Highlighted

Assuming you're using the AbsoluteEncoderCounters example:

 

1.  Yeah that's what I had intended--the specs you gave included a possible 10- or 12- bit configuraiton so I wanted to accommodate both.  Keep in mind I don't have the encoders to actually try it out for myself though...

 

2.  I had configured it this way to keep it a little simpler for test purposes.  You can manually turn the encoder slowly and check the value as you do it to make sure the acquired data matches reality.  To get the task to sample the encoder data at a fixed rate you should just need to modify the ctr0 task to run continuously:

 

a. Add a DAQmx Timing VI to the task (before committing/starting)--configure it to "Implicit", and make the sample mode "Continuous Samples".

 

b. Modify the high time for your task depending on your desired sample rate (sample rate= 1/(high time + low time)).

 

c. Move the DAQmx Start to before the loop, but after all the other tasks have started (wire the error out from the Merge Errors function to the input of the DAQmx Start to achieve this).  Remove the DAQmx Stop.

 

d. You no longer need to commit the task explicitly.

 

e. Remove the event structure and the acquire button (or if you're feeling up to it replace it with a dynamic DAQmx Every N Samples Event...)--you could instead just read every loop iteration and poll the stop button in your loop to keep it simple.

 

f. Depending on your sample interval (in part b), you may need to read back more than 1 "sample" per loop (keep in mind a single "sample" is really 12 samples of the digital input line).  You'll have to parse the array accordingly.

 

3.  Before following the steps in #2, try just manually rotating the shaft if possible and keeping it stationary through several reads for troubleshooting, then slightly turn the axis and repeat, and keep doing this.  You'd only expect a large jump when the measurement transitions between 4095 and 0.

Once the shaft is rotating on its own, you could run into seemingly random measurements if the sample rate is not enough (at the point where you are uncertain about the number of rollovers that have occurred).  If you know the direction of movement, the sample rate must be greater than (not equal to) the rate that the shaft is turning.  If you don't know the direction of motion, the sample rate needs to be greater than (not equal to) twice the rate the shaft is turning.

 

 

Best Regards,

John Passiak
0 Kudos
Message 24 of 49
(1,871 Views)
Highlighted

Hello John: thanks a lot for your detail instructions. I will find a solution following your method. Thanks a lot once more!

Best regards,

Boborain

0 Kudos
Message 25 of 49
(1,856 Views)
Highlighted
Hello John: Since last time you help me to find the vi to get data, when I operate by myself, there are some problems, I can't find the way. I follow your method and modify the vi to the one shown in the picture and for the step #2, I can't find the place of ctr0 task to run continuously. Would you please help me to get troubleshooting? Thank you very much! Best, Boborain
0 Kudos
Message 26 of 49
(1,795 Views)
Highlighted
Hello John: Just now I suddenly realized that I connected the wrong line, now I modify the task connection wire. But the result is still bad. Please refer to my attachment. Actually, I don't turn the axis of the encoder, the output of the encoder should be constant, what's more the value is not bad. Would you please help me to solve it? Waiting for ... Best regards, Boborain
0 Kudos
Message 27 of 49
(1,793 Views)
Highlighted

Hello John:

I want to ask you about the Analog voltage output issue. Now I'm using the output port a01 to control the proportional valve.

I compile the vi program, after I stop the program, it seems the valve still get the signal from the output a01.

Only after I shutdown the vi, there is no signal to the valve. I don't know what happened. I'm compiling a control vi. If I can't solve this problem, I can't continue the next job, how can I do?

Thanks a lot!

Best,

Boborain

0 Kudos
Message 28 of 49
(1,755 Views)
Highlighted

Just write 0 (or whatever voltage you want) to the output before exiting your program.  Resetting the device would also revert the output back to 0 volts.

 

 

Best Regards,

John Passiak
0 Kudos
Message 29 of 49
(1,752 Views)
Highlighted

Hello John:

I post a Labview program to describe the problems I met. Actually, now I'm using the USB-6353 DAQ to control the hydraulic system to finish the task. There are two analog signal outputs to control the pressure of the valves and 3 inputs encoder angular and valves pressure respectively. I have to get the 2 pressure signals of valves at the same time. Now I meet the problems that the response time is too long of the close loop control and also the other problems as I marked in the attachments. Would you please  have a review and help to find the solutions? I tried to find the way, but it seems the troubleshooting is very difficult. 

 

Thanks a lot!

Best regards,

Boborain 

0 Kudos
Message 30 of 49
(1,738 Views)