Page 1 of 1

Two Digital inputs phidget1063

Posted: Tue Aug 18, 2020 6:04 am
by Cyril06
Hello everyone,

I am trying to use a phidget1063 steppermotor card and I want to pilot the stepper motor with two switches (connected to digital input).
Individually stepper motor and switch works well.
But I don't know how to read two digital inputs in the same labview programm.
For that I need to read and change the channel value entered in "DigitalInputStart". But this value is fixed during the initilization step and does not change after.
How to deal in the same time with two digital inputs from the same 1063 card and labview , if anyone have an example, thanks?

Re: Two Digital inputs phidget1063

Posted: Tue Aug 18, 2020 8:40 am
by mparadis
You should be able to hover over the "Channel" connection for the digital inputs and right-click and select "Create" -> "Constant". Type "0" for one of them and "1" for the other.

Re: Two Digital inputs phidget1063

Posted: Tue Aug 18, 2020 4:28 pm
by jdecoux
To tack on a bit more information, you can use the Channel parameter of the Device Info cluster. There are two ways to do this:

In both cases right click the Device Info input on the DigitalInputStart vi (in the top-left corner).

Either choose Create->Control to have the values accessible from the control panel, or choose
Create->Constant to set the values from the block diagram.

In both cases, set the Channel property of the cluster to 0 and 1, for inputs 0 and 1 respectively, or to whichever inputs you are using.

Re: Two Digital inputs phidget1063

Posted: Wed Aug 19, 2020 1:33 am
by Cyril06
yes I have tried to play with the channel from the "device info cluster";
But, once the initialization is done (device recognized, etc) the programm will not check anymore if the value of the channel parameter in the cluster have been changed. I can change it (create control) but it will not read it as it is not in my loop.
I am quite new to labview, is there another way, like "events" to deal will more than one digital input on the phidget.

I put the modified phidget example I would use to test how to read channel 0 or 1

Thanks again
DgitalInput event county test.pdf
(11.95 KiB) Downloaded 598 times

Re: Two Digital inputs phidget1063

Posted: Wed Aug 19, 2020 12:41 pm
by jdecoux
You are correct, once opened the channel is set and cannot be changed until the device is closed.

In order to access the second channel, you need to open a second DigitalInput object.
Multi Channel Block Diagram.PNG
Multi Channel Front Panel.PNG

Re: Two Digital inputs phidget1063

Posted: Thu Aug 20, 2020 1:16 am
by Cyril06
It works, thanks a lot!