04-21-2012 03:58 PM
I'm using LabView 2011, and I'm also using a USB-6008. I'm using the analog output A01 and Ground to run those to a BNC cable (the other side of the cable has marked areas for ground and center so that i know where to put my wires coming from the DAQ) that is hooked up to a trigger. I want to trigger an arm to move up when high potential is applied (5V) and then bring it back down when there is no potential. I'm having a hard time getting that to actually work though.
I tested my signal output on the measurements program and I am seeing a signal being given out from 5V then to 0V so that's good. I also tried making it a task and that's where I got stuck trying to make the task and actually make the arm move. Any tips on what could be done?
Solved! Go to Solution.
04-23-2012 05:15 PM
Hi,
I'd like to ask you what is the power consuption of the arm?
The maximum output current for this card is 10m Amps and maybe your arm needs more current.
Best Regards
Miguel Fonseca
Applications Engineer
National Instruments
04-23-2012 05:32 PM
Well right now, the arm VI looks like this. Now I just need to do the loop to make it run for 210 seconds at .5 Hz which I'm currently working on, if you have any tips, that would be great.
04-24-2012 12:27 PM
I'm having trouble assembling a working loop. Any help?
04-24-2012 12:36 PM
You don't really think that by passing a '5' to the DAQ Assistant is supposed to indicate it is supposed to output 5 volts, do you? Either pass it a T/F Boolean or a 1/0 (for a logic 1/logic 0). Your 5 is converted to binary and will be the binary pattern 0b0101. This will gnerate an error because the pattern requires 3 pins to be used.
04-24-2012 12:47 PM
No, the 5 was just arbitrary so that I knew what value for myself I had. I don't generate any errors when I run the VI, my arm moves up and down without any problems. I'm just looking to try and create a loop. While this runs, I'm running an experiment to cover light and uncover light. My arm blocks the light for the 2 seconds and then unblocks it for 2 seconds.
04-24-2012 01:19 PM - edited 04-24-2012 01:20 PM
Well, you do have a loop. to make the switching automatic, you just need a shift register/feedback loop with a Boolean and an invert function. Use the Delay function or Wait (ms) to control the timing.
04-24-2012 01:55 PM
Alright I see that does the trick for the automation, how do I incorporate the DAQ properly? I tried to hook it up in the loop but it only just went with "1" and didn't go back to "0." Also, can I add iterations of the up and down in this particular loop or do I have to change it to a for loop?
04-24-2012 03:16 PM
I don't use the DAQ Assistant and use the DAQmx functions (DAQmx Write - Digital Boolean 1Line 1Point) directly but try connecting the Assistant where the Boolean is.
Yes, you can stop a while loop after x number of iterations or use a for loop.
04-24-2012 03:42 PM
So here's what it looks like, I do get like I said previously, a "1" but after, I can't get a "0."