08-12-2013 05:08 PM
Hello,
The temperature from a source is sensed using the NI PXIe-6363 and NI SCB 68 board and compared against a user defined value in labview. If the sensed temperature is higher than the set value, a +5V signal is written out of the SCB 68 board. The entire program works well except for the fact that there exists a delay in writing the signal out of the SCB board. As soon as the temperature crosses the set value, a +5V signal is being shown as written out of the SCB board (in the DAQ assist_write) in the wave form graph in the program. But it takes a while (delay of 5-7 seconds) for the SCB board to transmit the +5V signal out from its pin.
Input pins used for sensing the temperature: - 33 & 66; ai1 in the PXIslot2(PXIe-6363)
Output pins for writing the +5V signal - 21 & 54; A0 1 & A0 gnd; PXI slot2(PXIe-6363)
Kindly help me in solving this issue.
Regards,
psks
08-12-2013 05:12 PM
My guess is there is a problem with your LabVIEW code that is introducing a delay.
But that is only a guess since you haven't uploaded your VI.
08-12-2013 05:19 PM - edited 08-12-2013 05:22 PM
Hello,
I forgot to attach the vi.
Rgds,
Karthik
08-12-2013 05:24 PM
How does it behave if you eliminate the Write to Spreadsheet File functions? One of your file paths is to a server. If the communication to that remote location is slow, it may slow down the entire iteration rate of your loop.
08-12-2013 05:33 PM
Thanks for the reply. I tried doing that too. It doesn't help. The problem persists.
08-13-2013 08:26 AM
Next step I'd recommend getting away from the DAQ assistants and Express VI's. They add way too much overhead.
Trying using basic LabVIEW primitives for things like "greater than", and use lower level DAQmx functions to set up your DAQ tasks and run them.
08-13-2013 10:59 AM
I tried doing that. Still there is a delay for the actual signal to get transmitted across even though the operation is completed in labview (front panel). Any reasons for the delay (around 5-6 seconds)?
08-13-2013 11:05 AM
Post your latest VI. Try some debugging tools like putting in several Tick count functions in a manner that will help you figure out what is taking the longest in your while loop.
08-13-2013 12:16 PM
Since, the simpler blocks had no effects, I had computed the timing analysis using the express VI's. The execution time for reading the data (segment 1 in th eprogram) is 410 ms, execution time for segment 2 (filtering) - oms and for the segement 3 (writing) - 412ms. These follow the samples to read and sampling rate.
08-13-2013 03:13 PM
Hello Ravensfan,
Thanks for the suggestion. I tried debugging it path by path and it works. Also, I changed the write time from software timed to user defined value in the DAQ assist write function (by clicking on a small button in the properties window).
I have to modify the existing setup as follows:
existing set up: Acquire temperature ---> filter ---> compare with reference value ---> if greater ----> generate +5V volt signal. The timing of the entire process depends on the sampling rate of the read and write DAQ assist.
Modified setup needed: Acquire temperature ---> filter ---> compare with reference value ---> if greater ----> generate +5V volt signal for a fixed amount of time (irrespective of the sampling time) ----> again compare with reference value. The generation process alone has to take place for a specific period of time in a loop.
Since, the +5V signal generated in the existing setup depends on the sampling period at which temperature is acquired, how to modify the setup? i.e The temperature is obtained every 0.4 seconds and if the acquired temperature is found to be greater than the reference, then a +5V signal has to be generated for 5 seconds and again the comparison operation has to take place.
How should I go about in changing the existing setup? I am new to labview.
Regards,
Karthik