VINT Hub doesn't getAttached

Supporting Max/MSP versions 6 and up
Post Reply
pkokoras
Phidgetsian
Posts: 9
Joined: Tue May 19, 2020 4:16 pm
Location: USA
Contact:

VINT Hub doesn't getAttached

Post by pkokoras »

Hello,

I connect my VINT Hub Phidget on a MacBook and the Phidget Control Panel recognizes it fine. However, when I try to use one of the MaxMSP examples (PhidgetVoltageRatioInput.maxhelp) it gives me errors:
- print: deviceSerialNumber -1
- PhidgetVoltageInput_setVoltageRange() failed: (0x34) Device not Attached
- etc...

However, if I connect the Distance Phidget and open the patch PhidgetDistanceSensor.maxhelp, this patch works fine with the VINT Hub...

Any idea why is that?
Thanks,
Panayiotis
User avatar
mparadis
Site Admin
Posts: 959
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: VINT Hub doesn't getAttached

Post by mparadis »

In order to open the VINT ports in Digital Input, Digital Output, Voltage Input, or Voltage Ratio Input modes, you need to set the IsHubPortDevice property to "true" before opening (this might have a slightly different name in Max/MSP).

SetVoltageRange in that example will still fail though, but you'll get "Unsupported" instead of "Device Not Attached" because SetVoltageRange is only for devices like the VCP1000.
pkokoras
Phidgetsian
Posts: 9
Joined: Tue May 19, 2020 4:16 pm
Location: USA
Contact:

Re: VINT Hub doesn't getAttached

Post by pkokoras »

Thanks! Problem solved.
Initially, I was trying to send a message (setIsHubPortDevice 1) to the [PhidgetVoltageRatioInput] object, but didn't change anything, although hitting (getIsHubDevice) will print 1=True in the Max Console.

Then, I tried to put the message as an argument in the object [PhidgetVoltageRatioInput ishubport=1], and immediately the VINT Hub got attached.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests