LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital I/O: how to drive a device and read input at the same time?

Hello,

 

I'm a Labview newbie, trying to use Labview 2012 and an MCC USB-1208FS-Plus DAQ box to spin a stepper motor and read data from the digital optoswitch on the motor, which gives a pulse once per revolution. My VI is attached. I can drive the wheel okay via the ULx library by sending a sequence of 1,0 signals in a While loop to bit 0. I added a nested inner While loop to try and read the digital optoswitch (via bit 1) in series after sending each pair of signals but I got this behaviour:

 

it moves the the wheel 1 step, then happily samples the input from the switch as many times as I tell it to, but then when it goes back to the outer loop to drive another step it gives "Error 42 at ULx write. Possible reason: Digital Port not configured correctly for requested operation". Since I can address the drive and the optoswitch with no trouble I am puzzled about why it fails when I try to do both in sequence. I hope this is an obvious one to those who understand Labview...

 

Grateful for any help at this stage....

 

Phil

Download All
0 Kudos
Message 1 of 3
(2,791 Views)

The forum you posted into is for messages about the operation of the forum.

 

You need to post in the LabVIEW forum.

 

I've sent a message to the moderator to have the message moved there.

0 Kudos
Message 2 of 3
(2,776 Views)

Thanks.

0 Kudos
Message 3 of 3
(2,756 Views)