11-10-2009 03:45 PM
Hi,
I am trying to control an external pump (a KD scientific, I know there are DevZone applications for this, but they are RS232 based, and I am working with the TTL side of the pump) through digital ports. I can control the pump through the test panel for my device. What it looks for is a falling edge on pin 8 (wired to line 6 in this case) to activate the pump, as well as 0 values at line 7, 1 values at line 1 and 2, and I am using line 5 as an input, 1 indicates the pump is active, 0 indicates the pump is inactive. If I use the test panel, and set these lines how they are needed, and double click the control for line 6, the pump starts or stops as desired. However, when I tried to actually program this, I cannot get it to respond. I have a good amount of experience with analog signals, but little with digital signals. Any help or examples where this can be found would be greatly appreciated. Attached is a copy of the code I have tried to use for this. Thanks,
<>< Eric
Solved! Go to Solution.
11-11-2009 08:45 AM
Not sure why you are starting and stopping all of those tasks inside the loop. That's not how you program your analog is it?
In any case, see the attached example. I included all lines in a single task and used an event structure so you will only write when the boolean control changes. You could create a single task for the static lines instead of combining them. That's up to you.
11-11-2009 11:02 AM
Thank you very much. Actually my analog were a little nicer than the digital I posted (though not by much); I am definitely a novice at LabView, and did not know how to wire multiple inputs into one task, so I have a series of tasks instead for the analog signals I am using. This should work; I will test it with the pump, and reply with the results. Thank you again,
<>< Eric