Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the default signal connections

Dear Mark,

 

Thank you very much for your reply.

 

I followed your advice. I used the default connections. In this case, I have got the values which are decreased, for example: -10, -12, -14, . . . These values are quite strange. Actually, I do not understand what is happening.

 

Can you help me to explain about this ?

 

Thanks so much for your helps and supports.

 

Best regards,

 

Duy

0 Kudos
Message 11 of 25
(1,766 Views)

Hello,

 

Are you using a quadrature rotary encoder?

Do the specifications of your rotary encoder match what is setup in the DAQmx Task?

0 Kudos
Message 12 of 25
(1,760 Views)

Dear Mark,

 

Thank you very much for your reply.  

 

I am using a quadrate rotary encoder and DAQ Assistant with the default signal connections. I am sure that the situation of my encoder is well. I tried to use the digital input function of LabVIEW for measuring the signal channels A, B, and Z of this encoder and the result is as the following figure.

 

 Screenshot_encoder.jpg

 

Actually, with this figure, we can count the pulse number and calculate the motor speed.

 

For example: With the above figure, I can analysis as follows:

 

I am using British Encoder, No. 39549, Mod. 735 TP, PPR. 2500.

 

We know that the encoder is 2500ppr.

We can see that approximately 10.5 pulses are measured in 100 seconds.

The motor will turn one full revolution in 2500/10.5 X 100 seconds = 23809 seconds = 397minutes.

So the motor is spinning at 1/397 rpm ~ 0.025 rpm. This value will be multiplied with the scaling factor and then we can have the motor speed.

But the above method has been done by hand. And we cannot use this value to do other works during a run.

I hope that my presentation is clear. 

In summary, I think that maybe there are some problems which are happening as we use input counter of LabVIEW. If you have any idea about this, please help me.

Thanks so much for your helps and supports.

Best regards,

Duy

Message 13 of 25
(1,757 Views)

A very good screenshot, that proves that your signal is perfectly fine!

 

It seems to me that you are only interested in the frequency of the pulses, to determine RPM? You could do a DAQ Assistant Frequency measurement:

 

frequency.PNG

 

Connect Phase A of the encoder to the recommended PFI line in the DAQ Assistant. The issue with this method is that you won't be able to detect direction of rotation, please indicate if this is a problem!

0 Kudos
Message 14 of 25
(1,749 Views)

Dear Mark,

 

Thank you very much for your idea.

 

But it is obvious that we could not know the direction of rotation in this idea. This can also be a problem which we need to consider.

 

Once again, thanks so much for your helps and supports.

 

Best regards,

 

Duy 

0 Kudos
Message 15 of 25
(1,734 Views)

Hello,

 

This example uses the Pulse Count DAQ Assistant with Count Direction set to External, converted to a task, then example code generated. Then I insert a property node to change the assignment of the Counter Direction Pin to one of the PFI lines (PFI9 in example). Phase A of the encoder is connected to what the DAQ Task suggests (PFI8 in my case) and Phase B is connected to the Counter Direction Pin that you set with the property node.

 

The example works for me, and gives me speed, and speed is positive in one direction, and negative in the other so you can detect direction.

 

There is a bug if the counter goes below 0, it underflows to the maximum counter value, which makes speed jump very high for 1 loop.

 

speedEncoder.PNG

0 Kudos
Message 16 of 25
(1,729 Views)

Dear Mark,

 

Thank you very much for your idea.  

 

I followed your idea. But I do not understand why my code does not work. I send my code to you. Can you help me to have a look at it ?

 

Speed_New_Idea.jpg

Thanks so much for this.

 

Best regards,

 

Duy

 

0 Kudos
Message 17 of 25
(1,726 Views)

Hello,

 

Your VI works for me fine! The numeric indicator for speed is off the screen though (data 2) and this is the one that shows speed. Could you post a screenshot of your DaqMX task? 

0 Kudos
Message 18 of 25
(1,714 Views)

Dear Mark,

 

Thank you very much for your reply.

 

These are some screenshots which I think that you need to have a look at. But I think that you can see them on my VI which I sent to you as well.

 

DAQ_Assitant_Task.jpg 

 

Fig. DAQ Assitant

 

Error_Speed_New_Idea.jpg

 

Fig. Error

 

DAQ_Chanel.jpg 

 

Fig. DAQmx Channel

 

 

 

Thanks so much for your helps.

 

Best regards,

 

Duy

0 Kudos
Message 19 of 25
(1,712 Views)

Hello,

 

I could not see these settings on the VI you sent, as the DaqMX task only exists in your MAX panel.

 

Could you change this setting:

 

original_mod.JPG

 

To Externally Controlled

0 Kudos
Message 20 of 25
(1,709 Views)