|
Hi Jimmy,
We are having exaclty the same problem as you. Could you finally solve it?
We'll really apreciate your help :)
"Jimmy " <dvoudour@phed.auth.gr> wrote in message <hkrh5g$agv$1@fred.mathworks.com>...
> Hello all,
>
> coming back again with something wrong (?) with my parallel port. There is a device with buttons, so the volts in that electric circuit are supposed to change when someone presses a button. We have checked that the buttons are working with a voltmeter.
>
> However, when I generate a simple (but perhaps built not in the right way) code the only value I read from the parallel port is '1'. This value is present either the device with the buttons is plugged in or not, and either I press a button or not. No change at all.
>
> The device is connected to LPT1, which works fine as I see in the Device Manager. I try to read data from Port 0, pins 2 to 4.
>
> I register the digital object and execute a code as:
>
> dio = digitalio('parallel', 'LPT1');
> inlines = addline(dio, 0:4, 'in')
>
> for i = 1:1000 %Get the value 1000 times
> start(dio)
> value_1(i) = getvalue(dio.Line(1));
> value_2(i) = getvalue(dio.Line(2));
> value_3(i) = getvalue(dio.Line(3));
> value_4(i) = getvalue(dio.Line(4));
> pause(2)
> stop(dio)
> end
>
> delete(dio)
>
> BUT the value I get it always 1, no matter the condition, no matter pressing the buttons, no matter if the device is plugged in or not...
>
> Any ideas?
|