08-23-2010 09:49 PM
Hi there,
I am currently doing my school project and i managed to do the stepping of the motor through the digital port of the USB 6008 by setting the boolean output in a while loop with use-cases but now i faced a problem because i am required to use it with a reflective sensor and stop the motor when it senses a digital pulse.The sensor is configured as a counter using PFI0 on the USB 6008 with a circuit which will send in a digital pulse to the daq.
How do i go about stopping the motor when the reflective sensor is blocked and then start the stepping again when it's not blocked
Thanks
Solved! Go to Solution.
08-23-2010 09:54 PM
Do you really want to work with this like a digital pulse, or like a digital input?
I would treat it like a digital input where you read the input and it is either true or false depending on the presence of the object detected by the reflective sensor.
08-23-2010 10:09 PM
thanks for the reply but i could not get the boolean data from the daqmxRead. I put a indicator at the data line and it's in number value not boolean
08-23-2010 11:01 PM
Post your VI. It is probably a matter of the task not being configured properly, or the DAQmx Read VI not configured properly.
08-24-2010 12:05 AM
Attached is the VI you requested please advise thanks
08-24-2010 08:48 AM
The upper task is still set up as a counter task. You need to change the DAQmx create channel as a digital input, and the DAQmx read as a digital boolean 1 channel 1 sample.
08-24-2010 08:30 PM
i had already change it to digital input and connect the circuit to the digital port on the daq but it keeps on reading a true even though i blocked the sensor.
08-24-2010 08:42 PM
sorry ignore my last post i was successful in doing so i had not change the physical input channel to the digital port thanks for the help