Page 1 of 1

Problems with Libraries 22

Posted: Wed Nov 15, 2017 2:30 pm
by satsriakal
Dear Sirs,

I'm coding for InterfaceKit888 with Python libraries.
I implemented a code with old libraries, using InterfaceKit() module, and everything was working properly, but when I swapped to the last version libraries (Phidgets22), I could'n find InterfaceKit() and I wrote a new code with API, but the result is really bad compared to the first one.
Is it possible to have InterfaceKit() module in the last version of libraries as well?

Best regards
Beppe

Re: Problems with Libraries 22

Posted: Wed Nov 15, 2017 2:43 pm
by mparadis
In the new libraries, objects have been split up into individual channels instead of whole boards. The InterfaceKit object has split into DigitalInput, DigitalOutput, VoltageInput and VoltageRatioInput. For more information, look at this guide.

Re: Problems with Libraries 22

Posted: Wed Nov 15, 2017 2:58 pm
by satsriakal
Thanks for the answer.
I see what you say, but I see that the learning curve has drastically worsen, time for writing code has increased and performances went down...
With eight sensors the response time has become very slow...

If I compare two codes, the first one with old libraries and the other one with new libraries, the first one is definitively the best one: little coding time, best performances....

New versions should improve...

Re: Problems with Libraries 22

Posted: Wed Nov 15, 2017 3:03 pm
by mparadis
The problem with Phidget21 was that because many devices shared the same object type, there had to be more and more exceptions just to get them to fit the same mould. Giving each channel its own object also made it easier to set the properties of each channel separately (e.g. setting individual brightness, current and voltage limit for an LED controller).

As far as response time is concerned, it should be no different in Phidget22. If it seems slower, you may not have set dataInterval to the minimum value.

Re: Problems with Libraries 22

Posted: Wed Nov 15, 2017 3:09 pm
by satsriakal
The code is not able to recognize SENSOR_TYPE constants. What have I to do?
Have I to create an object for any sensor connected to the InterfaceKit888 board? Have I to call setOnAttachHandler for any sensor connected?

What do you mean datainterval?

I understand your reasons, but I think that now it's more complicated than before. Phidgets strength was in their simplification

Re: Problems with Libraries 22

Posted: Wed Nov 15, 2017 4:04 pm
by mparadis
You have to type the name of the enumeration before the sensor type, for example:

Code: Select all

VoltageSensorType.SENSOR_TYPE_1127


The data interval can be set for each channel using setDataInterval. The minimum should be 1 millisecond, so typing setDataInterval(1) for a particular voltageInput channel will give you the maximum rate of data coming in.

Re: Problems with Libraries 22

Posted: Wed Nov 15, 2017 4:07 pm
by satsriakal
Thanks a lot!

Re: Problems with Libraries 22

Posted: Wed Nov 15, 2017 4:14 pm
by satsriakal
If I use setDataInterval() the system locks and I get "watchdog: signaling pd..." messages in the console

Can you help me?

Re: Problems with Libraries 22

Posted: Thu Nov 16, 2017 8:29 am
by mparadis
I've never heard of that error before. I looked it up online and it seems like "pd" is something called "Pure Data". Are you using that?