Discussion:
Can I interrupt a while loop with a digital pulse through my NI-4350
(too old to reply)
labuda
2006-05-08 01:10:07 UTC
Permalink
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.
Tica T
2006-05-08 20:10:10 UTC
Permalink
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 <a href="http://www.ni.com/devzone/dev_exchange/ex_search.htm" target="_blank">Example Code Library</a>.

I have included some examples you might find helpful:
Acq&amp;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.&nbsp; Additionally, the example shows how to efficiently
restart the task therefore running at optimal speed.

Cont Acq&amp;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


Acq&Graph Voltage-Int Clk-HW Trig Restarts.vi:
http://forums.ni.com/attachments/ni/70/4884/1/Acq&Graph Voltage-Int Clk-HW Trig Restarts.vi


Cont Acq&Chart Samples-Int Clk-Pause Trigger.vi:
http://forums.ni.com/attachments/ni/70/4884/2/Cont Acq&Chart Samples-Int Clk-Pause Trigger.vi
Loading...