LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

how can I simulate an extra digital line?

I'm using labwindows with a pci6052E card that has only 8 di/o lines which I'm already using. I need a 9th TTL line for the electronics I'm controlling. What is the easiest way to do this using the other outputs available ? i.e. analogue out or counter/timer lines. It doesn't need to be fast at all, just able to switch between 0v and 5 v under the control of a button on the user interface.   
 
I'm assuming I could use the analogue out line but that seems a bit heavy handed. Is there a way to programme a counter/timer line so you can just switch it high or low easily? I've looked through all the nidaqmx functions and can't find anything that looks suitable.
 
I would be grateful for any ideas.
 
 
thanks
 
 
 
0 Kudos
Message 1 of 4
(3,258 Views)
Easiest would be to use an analog output channel. The best the counter could do is generate a very long pulse, but still this pulse must have a defined "high-time", so it is not possible to program the counter in a way, that it switches statically to 5V.
0 Kudos
Message 2 of 4
(3,236 Views)
I would also probably use the analog channel for the ninth bit, even though it is overkill.  But if you really do want to try the counter there may be a way to get what you want. DAQmxCreateCOPulseChanFreq() and the other daq functions of this type have an IdleState parameter.  I am not sure of the exact details under DAQmx but what you are trying to do is configure a single short pulse (basically a one shot mode) on the counter output pin that then leaves the pin in the idle state you want. 
By reconfiguring the pulse output you could transition between high and low, the transition would have a glitch in it as the output executed the short pulse, but if transition speed is not an issue it should work.  There are examples and information on generating pulse outputs in daqmx help files.
 
Good Luck
0 Kudos
Message 3 of 4
(3,226 Views)
thanks for both these replies - was exactly the sort of advice I was after.
0 Kudos
Message 4 of 4
(3,205 Views)