LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure PFI as a counter in NI 6251

Hi,
 
I need a total of 4 counters. However, NI 6251 only has 2 counters. May I know how I can configure PFI as a counter for the remaining? Please advise. Thanks.
0 Kudos
Message 1 of 11
(4,110 Views)

Counters are resources (just like analog IO channels), PFI are interfaces to these resources.  If you have only 2 counters you cant just configure additional pfi lines as additional counters.

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 11
(4,105 Views)

Hi,

I am currently working on a PID control which require MIMO. I have worked on a circuit for SISO (see attached). Appreciate your advice how I can configure my current circuit to support MIMO. Thanks.

0 Kudos
Message 3 of 11
(4,101 Views)
Hi ycheehao

Are you trying to get more counter output channels to have a multiple input multiple output PID controler?  Are you trying to add another card so that you can have more counters?  What specifically is wrong with the vi that you posted in this forum?  I can help you if you have a specific question about your application.


Thank You,

Nick F.
Applications Engineer
0 Kudos
Message 4 of 11
(4,068 Views)

Hi Nick F,

I am currently working on the balls in 2 tubes height control experiment. An ultrasonic sensor is used to measure the height. The control objective is to regulate the speed of the fan so as to keep the ball suspended at a predetermined point in the tube. PID controller is used. The VI I attached earlier allows me to work well with 1 tube. But if I need to control 2 tubes independently, there are insufficient counters. I am exploring on other alternatives but till now, unable to resolve.

Appreciate your guidance on how I can improve my VI. Thanks.

0 Kudos
Message 5 of 11
(4,061 Views)

Hi,

Appreciate advise. Thanks.

Regards

 

0 Kudos
Message 6 of 11
(4,032 Views)
Hi Ycheehao,

To have more counters to control another tube, you will need to get another DAQ card so that you have access to more counters.  To have the new card control the second tube, you can basically copy all the code that you have and have two separate loops, one for each tube.  You will then need to have the second set of code reference the counters on the new DAQ card.  If you have no more counters on your card, then this would be the best way to add another tube.


Message Edited by Nick F on 03-24-2008 05:27 PM
Thank You,

Nick F.
Applications Engineer
0 Kudos
Message 7 of 11
(4,009 Views)

Hi Nick,

Thanks. Unfortunately, I do not have additional card. I have tried using AI voltage to replace the counter to the sensor. There is a 10Hz signal triggering the sensor. However, the reading from the senosr (in the front panel of the vi) is flicking and unstable. I have attached my VI. How can I improve the stability of the reading? Another advice, how can I select the timebase which I have on my board?

Really appreciated..

Regards

 

0 Kudos
Message 8 of 11
(3,995 Views)
Hi ycheehao,

You can probably bet better reading if you increase the sampling rate.  It is possible that the jitter you are seeing is because your sampling rate is too slow and the edges you are trying to find fall inbetween the samples that you are reading.  You can also change the timebase like you are asking.  To do this, put down a DAQmx timing property node and select Sample Clock >> Timebase >> Source.  Then you can create a constant off of the property and select another timebase. 

Another thing to be careful of is that you are writing to a measurement file within the while loop, which takes a lot of time and could cause your buffer to over run if you were running a continous acquisition.  Since you are running a finite acquisition, then you do not need to have that while loop there. 

Hopefully using a new timebase will make your acquisition look better.
Thank You,

Nick F.
Applications Engineer
0 Kudos
Message 9 of 11
(3,957 Views)

Hi Nick,

I have tried as proposed but I got an error message as attached. Appreciate if you could advise and if possible an example to resolve the error. Thanks.

Regards

0 Kudos
Message 10 of 11
(3,927 Views)