LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stop stepping of motor when senses digital pulse from light reflective sensor

Solved!
Go to solution

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

0 Kudos
Message 1 of 8
(2,928 Views)

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.

0 Kudos
Message 2 of 8
(2,926 Views)

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

0 Kudos
Message 3 of 8
(2,918 Views)

Post your VI.  It is probably a matter of the task not being configured properly, or the DAQmx Read VI not configured properly.

0 Kudos
Message 4 of 8
(2,912 Views)

Attached is the VI you requested please advise thanks

0 Kudos
Message 5 of 8
(2,905 Views)
Solution
Accepted by topic author bloodxrage

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.

0 Kudos
Message 6 of 8
(2,892 Views)

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.

0 Kudos
Message 7 of 8
(2,871 Views)

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

0 Kudos
Message 8 of 8
(2,868 Views)