LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

iotech ditgital write

Hello there -

following situation:

we are using a ioTech DAQBoard/2000. By using the labview modules of ioTech, there is no problem to connect to the card and change the digital output.
Now our purpose:
we want to use the digital output to control several devices. each device is connected to one bit of the 8bit out.
what does the program do?
at the moment there are two while loops and a 8bit boolean array reference.
the first while loop checks as fast as it can, if there is any change in the array reference and if so, it sends the new array-data to digital write.
the other whileloop simulates a 2Hz signal by setting array(0) to true/false and waits 250 ms.

and now the problem occurs. the while loops are very systemperformance dependin
g and as soon as i just move the mouse over the screen, the signals become incorrect. (between 50ms and 300 ms uptime).

has anyone any idea how to solve this problem?

the labview program is running on a pentium celeron 1000 mhz system with 250 mb ram.

thanks for any idea.

greetings -


tom
0 Kudos
Message 1 of 3
(2,643 Views)
Hi thomas,

i think first while loop, you can put little wait time to give priority to other while loop also bcoz your hardware card also needs some time to update the digital values. I dont know how software driver for your board works, but you can put the configuration & initialization code outside both while loops, put only the required code inside the while loop. This will fasten the operation inside the loops.

Hope it works. Your feedbacks are welcome.

Best Regards,
Nirmal Sharma
0 Kudos
Message 2 of 3
(2,643 Views)
> the first while loop checks as fast as it can, if there is any change
> in the array reference and if so, it sends the new array-data to
> digital write.
> the other whileloop simulates a 2Hz signal by setting array(0) to
> true/false and waits 250 ms.
>
> and now the problem occurs. the while loops are very systemperformance
> depending and as soon as i just move the mouse over the screen, the
> signals become incorrect. (between 50ms and 300 ms uptime).
>
> has anyone any idea how to solve this problem?
>

As the other response pointed out, you probably want to place a delay in
your loops. And this seems odd at first, but if you can't afford to
wait a whole ms, wire up a zero to the wait. This will cause the
scheduler to rotate the round-robin ex
ecution queue and will cause
smoother interleaving of tasks. Without this, the loops will often
interleave at around 100ms increments, which has less overhead actually
runs somewhat faster, but is more jerky.

Greg McKaskle
0 Kudos
Message 3 of 3
(2,643 Views)