LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does this loop used to write values to the parallel port keep going forever?

Have a look at this VI guys. I'm trying to send a sequence of bits (used to trigger an IC). I'm interested in the last bit of the data port (D0). so I'm sending either 0 or 1 to that pin to trigger the IC. it works, but the problem is that the loop keeps going forever and i cant control it. if i send 3 to the loop count, I'm expecting to get: 1 0 1 0 1 0, but it doesnt stop and keeps going forever.
It seems that the problem is not with the loop. because i deleted the loop and just left the flat sequence so that it executes only once, but still it keeps repeating. How can i make the flat sequence execute only once?
I'm using a parallel port monitor (parmon.exe) and a LED connected to D0 of the parallel port to check.
If anybody has an alternative or better method to send the bits to the parallel port, I'd be very thankful.

Message Edited by krayzie on 05-14-2005 04:33 PM

0 Kudos
Message 1 of 3
(2,642 Views)
I'm not sure, but it may have something to do with the parallel port waiting for a connection on the other side, some kind of handshaking thing. Try disabling all handshaking, I think you can do that in the parallel port init vi.

Can you use the serial port? That may also be an option.

Chris
Chris Reyerson
Optical Systems Engineer
Arete Associates
Tucson, AZ
0 Kudos
Message 2 of 3
(2,631 Views)
It works just fine here. Place an indicator to the iteration terminal [i] to watch how things progress. Do the number ever increase above N-1 to what you wire to N? I don't think so! 🙂

Also make sure you don't run the VI with the "Continuous run" button. In this case the VI would immediately restart whenever it is finished. use the "Run" button.
0 Kudos
Message 3 of 3
(2,629 Views)