04-22-2010 05:52 AM
hi, I use the NI USB 6009 DAQ card for a fish feeder control system. in the system need a lot of digital input . Can i use the Analog input replace as digital input? help me please..T.T
Solved! Go to Solution.
04-22-2010 06:12 AM
04-22-2010 06:18 AM
04-22-2010 06:24 AM
04-22-2010 06:37 AM
Hi,
you could use the Analog inputs as "digital lines".
- Simply define an analog level which is your TRUE level.
- Use the AI read funtion for reading the channels (i.e. Multiple Channels, 1 Sample)
- Compare the AI values to your limit value --> result is an array of booleans, corresponding to the AI channels.
04-22-2010 06:41 AM
i had post the example. i had three Limit Switch to detect the feeder machine on left , right and middle position. the digital side of DAQ i used all already, so i try to ask can i use the analog part as long as digital part. when i connect ask the VI is created. there show "The specified resource is reserved. The operation could not be completed as specified." can teach me how to solve it. my version is LabVIEW 8.5
04-22-2010 06:58 AM
04-22-2010 07:04 AM
Sorry, can you make it in Picture form?because my version is 8.5 yours is 8.6, so i cannot read the VI file you posted just now. thank you very much
04-22-2010 07:06 AM
Hi Jeff,
regarding your post 6/7 and the exam.vi:
You can have only ONE active task per resource, where resource means AI, or AO, or DI or DO.
For making it more clear:
You can use one task for reading all the Digital lines and a second for readong all the analog lines.
But you can not use one Task for reading AI 0 and smiulataenouasly a second task for reading AI1.
Read all AI lines in one task, then select the channnels you need as DI and format into Booleans.
04-22-2010 07:08 AM - edited 04-22-2010 07:10 AM
You can use the analog inputs to monitor "digital" signals or values that cross a certain threshold.
I noticed that you are using the DAQ Assistant. I always stay away from them.
I could not verify what your configuration was because I got an error message saying "Unable to view properties".
Check that you are not using the same channels ai0 or ai1 for the three analog inputs.