08-15-2007 04:13 AM
08-16-2007 03:54 PM
Thank you for posting on the National Instruments forums.
If you are using LabVIEW, there are several examples in the Example Finder that
will assist you in creating your application.
You can get to the Example Finder by clicking on Help and then Find
Examples…
First, you can use the example Cont Acq&Graph Voltage-Int Clk.vi to read what the value of each channel is. You will probably need to change the Physical Channel to Dev1/ai0:3 so that you are reading from all 4 channels at once. You will want to make sure the DAQmx Read is set to read multiple channels. You can then create logic that when you read the voltage from the channel, will change the output on a digital line to be high by using the code from Write Dig Chan.vi or Write Dig Port.vi.
If you were doing something else like creating a pulse train when you read a certain voltage on your input, then you can use another example instead of Write Dig Chan.vi. There are many examples in the Example that can help you out in this aspect.
08-28-2007 12:32 AM
08-28-2007 08:59 AM
08-30-2007 12:51 AM
Thanks Nick,
however if i'm now using a USB joystick.. What am i suppose to do? how can i like control the output given out form the joystick to control the NI USB 6009? and ya.. is the output given out from the joystick digital or analog outputs?? Thanks...
08-30-2007 01:16 PM
Deimon,
Look at the thread in my message above. You use the Acquire Input Data function to read the joystick. There are cluster outputs for direction info and axis info. You will need to take those results and translate them into the correct DAQmx Write functions.