LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What is the difference between Counter (PFI0) and Digital Counter (Digital Input Output)?

Dear all,

 

Hello, I am having a question.

 

I am using NI USB 6001, 6002, 6008 and LabVIEW 2017.

I want to read the RPM of a DC motor using encoder with the DAQ Devices and LabVIEW.

I have searched on the internet, we can use two options for that purpose:

1. Use Counter to count Falling/Rising of pulse resulted from the encoder, by connect the encoder output to PFI port (Which usually for trigger).

2. Use event counter by connect the encoder output to DIGITAL INPUT Port.

 

What is the difference between the two methods?

 

My hypothesis is that:

Digital input port reading depends on the timing (sampling time/freq).

while

PFI just detect the rising/falling, no matter when it is happening (not depend on sampling time/freq), so it will be very accurate.

 

Please help me, I need a reason why i choose between those two, for my final project undergraduate students.

 

Thanks a lot!

0 Kudos
Message 1 of 4
(2,796 Views)

Hi mifta,

 

1. Use Counter to count Falling/Rising of pulse resulted from the encoder, by connect the encoder output to PFI port (Which usually for trigger).

2. Use event counter by connect the encoder output to DIGITAL INPUT Port.

What is the difference between the two methods?

I don't know what you refer to with item 2…

Item 1 is supported by your (rather) cheap DAQ devices!

 

My hypothesis is that: Digital input port reading depends on the timing (sampling time/freq). while PFI just detect the rising/falling, no matter when it is happening (not depend on sampling time/freq), so it will be very accurate.

Just read the manuals of your DAQ devices to "know" instead of "using a hypothesis"!

Your USB600x devices only support static DIO lines, allowing only ~100Hz sample rate on a "1 sample on demand" usage. But the PFI port allows upto 5MHz pulse rate, more than enough for your encoders!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,786 Views)

Thanks for the answer, that's quick 🙂

 

I mean, what is the difference between "Change Detection" by using PFI and DIO?

 

But I think the rate frequency explains a lot, thanks 🙂

0 Kudos
Message 3 of 4
(2,780 Views)

Hi mifta,

 

what is the difference between "Change Detection" by using PFI and DIO?

There is no "Change detection" in your cheap USB DAQ devices (atleast not as an event source usable in your LabVIEW code).

When using the PFI pin the DAQ device is able to detect&count pulses. When using DIO pins you need to detect pulses on your own…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(2,768 Views)