All outputs to 1 on Phidget 0/0/4

Supporting 2.6 and up
um3

All outputs to 1 on Phidget 0/0/4

Postby um3 » Sat Nov 05, 2011 8:46 am

Hi everyone,
I am a newbie about phidgets and I'm trying to set all outputs of a 0/0/4 board to 1.
Executing this code:

Code: Select all

CPhidgetInterfaceKit_setOutputState(ifKit, 0, 1);

the phidget set output '0' to 1 without problems, but, if i use this:

Code: Select all

CPhidgetInterfaceKit_setOutputState(ifKit, 0, 1);
CPhidgetInterfaceKit_setOutputState(ifKit, 1, 1);
CPhidgetInterfaceKit_setOutputState(ifKit, 2, 1);
CPhidgetInterfaceKit_setOutputState(ifKit, 3, 1);

it set all outputs to 0 expect last output.

I am using libphidget21 under linux-2.6.38 on 32bit machine.

I need help please...

User avatar
Patrick
Lead Developer
Posts: 3100
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: All outputs to 1 on Phidget 0/0/4

Postby Patrick » Mon Nov 07, 2011 10:44 am

Are you checking the return value of the calls?

-Patrick

um3

Re: All outputs to 1 on Phidget 0/0/4

Postby um3 » Wed Nov 09, 2011 2:13 am

Patrick wrote:Are you checking the return value of the calls?

Hi Patrick,
thanks for answer.
Increasing output the system give me these messages:

Code: Select all

INFO: ReadThread running
INFO: WriteThread running
close output for port  0 :  0
close output for port  1 :  0
close output for port  2 :  0
close output for port  3 :  0
INFO: Device was unplugged - detach.
INFO: ReadThread exiting normally (Phidget detach detected in CPhidget_read)

I added some debug code to give me message:
close output for port {PortNumber} : 0

User avatar
Patrick
Lead Developer
Posts: 3100
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: All outputs to 1 on Phidget 0/0/4

Postby Patrick » Wed Nov 09, 2011 10:02 am

Can you post a full source code that will produce this issue?

-Patrick


Return to “Linux”

Who is online

Users browsing this forum: No registered users and 3 guests