02-01-2010 09:24 AM
Here is an example of a code that works absolutely fine sometimes. i am saying sometimes is because of its failure to perform the task due to following reasons.
Let me explain the tasks defined in this VI.
Attached find snapshots of the three AI chanells defiend in MAX.
This VI is based on following loagic,
The VI Measure the IEPE impact force from a peizoelectric force sensor with internal IEPE provided by USB-4431. Also it measure the displacement from a linear potensiometer (0-5 VDC) and a electric switch with gives out 5 volts when activated. This electric switch (trigger) is used to trigger write data to a txt file for prescribed period of time (2 seconds). This help us reduce the file size and start writing data to txt file just before the impact.
I have attched the VI (LV-7.1) for your refereral. The VI starts and starts aquiring data at prescribed rate using producer-consumer architecture. User provides prescribed period for which to write data to a txt file (2 secs). As soon as the electric switch get activated the AI3 (trigger) get 5 volts (> 3.5 volts) and starts writing data to txt file for 2 seconds.
I am getting following problems with this setup
please review attached VI and snapshots of the MAX task to let me know if my VI structure has some problems.
Thanks
DAQ_G