Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I interrupt a while loop with a digital pulse through my NI-4350

Hi,

I'm writing a program which gathers as much data as possible through an RS232 port, but has to go through a particular routine every time a sync pulse comes into the PCMCIA-4350 I/O port. The sync pulse occurs every 3 seconds

Currently I'm running a while loop which executes for around 2.7 seconds, then exits and waits for the pulse in the 4350. However, I'd like to optimize my code by having the while loop run continuously until a pulse reaches the 4350. To optimize, but also make sure that I never miss a sync pulse.  Is there some way i could implement an Interrupt type of procedure.

I know very little about this, so any help would be appriciated,

Thanks!
Aleks.
0 Kudos
Message 1 of 2
(3,153 Views)
Hello Aleks,

I'm not sure what kind of application you are working on. After it gets the pulse does it start the acquisition all over? Is this more of a pause trigger or a trigger restart?
You can find a lot of examples you might find helpful on the LabVIEW example finder under Help>>Find example. You can also search for a specific example from our Example Code Library.

I have included some examples you might find helpful:
Acq&Graph voltage-Int Clk Hardware Trig Restart - This example demonstrates how to acquire a finite amount of data (waveform) using the DAQ device's internal clock, each time an analog trigger condition is met.  Additionally, the example shows how to efficiently restart the task therefore running at optimal speed.

Cont Acq&Chart Samples-Int Clk-Pause Trigger - This example demonstrates how to continuously acquire data (Waveform) using the DAQ device's internal clock and a digital pause trigger.

Hope this gives you some ideas.

Regards,

Tica T
Applications Engineer
0 Kudos
Message 2 of 2
(3,140 Views)