LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Counter

Hello all,

 

I am a beginner in Labview. I am trying to create a digital input counter ( NI PCI-6514 port 3 line6 and line7- counter increments on high) where after reaching 10000 instances program would execute .bat file and reset counter. After struggling for days I decided to ask for help! Any help will be greatly appreciated.

 

Thank You,

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

Hi Isak,

 

after reaching 10000 instances program would execute .bat file and reset counter.

I imagine two options:

  1. Read the counter value until you get >=10000. Then call your batch file, stop the counter task and start it again (from zero)…
  2. Keep the current value of the counter in a shift register. Then read the counter value until you get ">=(stored value +10000)". Then store the new value of the counter in the shift register and call your batch file…
Best regards,
GerdW


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

Gerd,

 

Thank you for your response but as I said I am a beginner so honestly I am not sure how to even set this up. 

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

Hi Isak,

 

I am a beginner

Did you notice those "Training resources" offered in the header of this LabVIEW board?

 

so honestly I am not sure how to even set this up.

You already need to setup that counter task, start it and stop it when finishing your VI. Now you have problems to stop and start the task again?

(A state machine approach might help here.)

Best regards,
GerdW


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