InterfaceKit 8/8/8 with Max - no support for multiple analog inputs?

Supporting Max/MSP versions 6 and up
Post Reply
georgekhut
Fresh meat
Posts: 2
Joined: Wed Nov 14, 2012 6:35 pm
Contact:

InterfaceKit 8/8/8 with Max - no support for multiple analog inputs?

Post by georgekhut »

Hello
I'm a a longtime user of the Phidgets 8/8/8 Interface Kit, in conjunction with MaxMSP, which I have used for teaching and my own art exhibitions.

I'm now using Max8 and the Phidgets22 library for Max. I have been able to get the RFIDReader working - but cannot find a Max object for receiving multiple channels of data from the 8/8/8 Interface Kit. I can receive 1 channel of data from this device using the PhidgetVoltageInput object, but have not found documentation describing how to use PhidgetVoltageInput to access more than 1 channel of data from the analog Inputs
fraser
Engineering
Posts: 138
Joined: Thu Nov 19, 2009 4:41 pm
Contact:

Re: InterfaceKit 8/8/8 with Max - no support for multiple analog inputs?

Post by fraser »

Phidget22 removed the access of multiple channels from a single object, and broke it out into individual objects.

Under maxMSP language page https://www.phidgets.com/docs/Language_ ... e_Phidgets at the end it talks about multiple phidgets. I'm not a Max guy but it seems like you add another VoltageInput, in order to access each analog input, you'd want to set the "channel" to the input number.
davidestevens
Phidgetsian
Posts: 14
Joined: Tue May 14, 2013 5:01 am
Contact:

Re: InterfaceKit 8/8/8 with Max - no support for multiple analog inputs?

Post by davidestevens »

I was just struggling with this myself. It seems that you have to create a PhidgetVoltageInput for each input channel, and then use the setChannel message to attach each object to a specific input channel.
It also seems that once you've done that, the PhidgeteVoltageInput (henceforth - PVI!) objects ignore any further setChannel messages. I find that if I want to change the channel, I have to reinstantiate the object. (Though you probably wouldn't want to do this once you'd set the patch up. It would be useful for testing though.)
What I don't know yet, is whether or not that attribute is stored with the patcher (so that the next time you load the patcher the ports are found automatically), or if you need to loadbang setChannel messages to all of the objects...
... just checked - it looks like you have to send the setChannel message when you load the patch.And also if you're changing the default DataInterval using the setDataInterval message, you need to delay that bang by about 1000ms, to allow the Phidget objects time to attach (500ms was too short).

Hmm. Something I did made it all stop working. Had to restart Max & replug the Phidget. And it looks like I might need to increase the time before setting the DataInterval, as there's a tendency for the last PVI to attach to Channel 0 (which already has a PVI attached)... 2000ms seems to work.
jdecoux
Labview Developer
Posts: 180
Joined: Mon Nov 13, 2017 10:20 am
Contact:

Re: InterfaceKit 8/8/8 with Max - no support for multiple analog inputs?

Post by jdecoux »

Instead of using the SetChannel message, we recommend setting the channel along with any other addressing information in the text of the object itself, as outlined in the Specifying a Phidget section of the Max/MSP Language Page

For example, to specify a channel, you would use:

Code: Select all

PhidgetVoltageInput channel=1
jdecoux
Labview Developer
Posts: 180
Joined: Mon Nov 13, 2017 10:20 am
Contact:

Re: InterfaceKit 8/8/8 with Max - no support for multiple analog inputs?

Post by jdecoux »

In addition, you can use the "attach" message from the channel to catch when the channel has been attached, and use that to supply the "bang" for all your initialization parameters that need to be set after the channel is attached.

This will be more reliable than waiting on a timer, and will also catch cases where the channel is unplugged and plugged back in for any reason.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest