Page 1 of 1
InterfaceKit 8/8/8 with Max - no support for multiple analog inputs?
Posted: Tue Jun 04, 2019 11:19 pm
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
Re: InterfaceKit 8/8/8 with Max - no support for multiple analog inputs?
Posted: Wed Jun 05, 2019 9:02 am
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.
Re: InterfaceKit 8/8/8 with Max - no support for multiple analog inputs?
Posted: Wed Jul 03, 2019 10:33 am
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.
Re: InterfaceKit 8/8/8 with Max - no support for multiple analog inputs?
Posted: Thu Jul 04, 2019 9:48 am
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:
Re: InterfaceKit 8/8/8 with Max - no support for multiple analog inputs?
Posted: Thu Jul 04, 2019 9:56 am
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.