Connecting to VPixx

Hi Chris -

Im finally ready to start tackling the battle of sending trigger codes to the juice through the VPixx - but am having issues communicating with VPixx using %include vpixx. Here’s the error I get:

00:13:32: ERROR: Cannot open DATAPixx device: No VPixx Device was found (error = -1000)
00:13:32: ERROR: Can’t start iodevice (vpixx) and no alt tag specified
Extended information:
parser_context: mw_finalize

00:13:33: ERROR: Failed to parse experiment /var/folders/67/_hd4pbfd3js3zl3yj5lbprsc0000gn/T/MWorks/Experiment Cache/_Users_yeslab_Documents_MWorks_Experiments_YESCODE_example1_YES.mwel/tmp/_Users_yeslab_Documents_MWorks_Experiments_YESCODE_example1_YES.mwel.xml

Any recommendations on how to proceed with troubleshooting? The Mac is connected to the VPixx via USB (a long active USB 2 cable with an extender).

Thanks,
Yasmine

Hi Yasmine,

Have you installed the “VPIXX Software Tools for Mac” package (from the Downloads and Updates page on the VPIXX site)? If so, it looks like you need to uninstall it, as it doesn’t seem to work (possibly just on macOS 11 – not sure) and also appears to prevent MWorks from connecting to the device.

To uninstall, open the Terminal app and run the following two commands:

sudo launchctl unload /Library/LaunchDaemons/com.vpixx.deviceserver.plist
sudo rm -rf /Applications/PyPixx.app /Applications/vputil.app /Library/Application\ Support/VPixx\ Technologies /Library/Frameworks/i1Pro.framework /Library/Frameworks/i1d3SDK.framework /Library/LaunchDaemons/com.vpixx.deviceserver.plist /usr/local/bin/vpixxdeviceserver /usr/local/bin/vpixxdeviceserver.dmg

Once that’s done, MWorks should be able to connect to the device.

(Just for future reference, MWorks doesn’t require anything in the VPIXX Software Tools package, so there’s no need to install it just to use your VIEWPixx with MWorks.)

Cheers,
Chris

Hi Chris -

Thanks for clarifying!

I did install PyPixx and Vputil - which are useful for calibrating the
VPixx and running technical reports on it’s health/linearity/etc.

Is there a way that MWorks can disregard these applications? Or do I really
need to uninstall?

Thank you!
Yasmine

Hi Yasmine,

I did install PyPixx and Vputil - which are useful for calibrating the VPixx and running technical reports on it’s health/linearity/etc.

Interesting. I couldn’t get those apps to run at all. What version of macOS are you running?

Is there a way that MWorks can disregard these applications? Or do I really need to uninstall?

There’s not anything MWorks can do. However, it’d probably be sufficient to run only the first command I sent previously:

sudo launchctl unload /Library/LaunchDaemons/com.vpixx.deviceserver.plist

The VPIXX tools set up a persistent “device server” process that runs in the background. I suspect this process is somehow capturing the VIEWPixx and preventing MWorks from connecting to it. Running the above command will disable the process (but only until you next reboot your Mac).

It’s possible that PyPixx and vputil won’t work if the device server isn’t running. In that case, you can restart it with this command:

sudo launchctl load /Library/LaunchDaemons/com.vpixx.deviceserver.plist

On the other hand, if the apps do still work, you can disable the device server permanently with the following command:

sudo launchctl unload -w /Library/LaunchDaemons/com.vpixx.deviceserver.plist

That should prevent the device server from restarting even after reboots.

Cheers,
Chris

Hi Chris -

We’re running Catalina 10.15.7

As you recommended, I used the following command:

sudo launchctl unload /Library/LaunchDaemons/com.vpixx.deviceserver.plist

This fixed the problem of MWorks detecting the VPixx device, but as
suspected I can now no longer run the Vputil and PyPixx apps.

It sounds like running this command will only work until I reboot the mac
again. Would you recommend that I fully uninstall vpixx apps? And maybe
only reinstall them when I need them (to test/calibrate the monitor(?

Thanks,
Yasmine

Hi Yasmine,

I dug in to this a bit more:

VPixx provides the API that MWorks uses to communicate with VPixx devices in two forms: a precompiled library, and source code. When I first developed MWorks’ DATAPixx interface, I found that the precompiled library just didn’t work (for unknown reasons). Therefore, I had to use the source code form of the API, which worked fine. Also noteworthy: Back then, there was no VPixx Device Server. That was first released for macOS earlier this year.

In the latest version of the VPIxx software tools (the one that installs the VPixx Device Server), the source code version of the API is unchanged from the older version. As expected, the MWorks DATAPixx interface based on this source code works as before, except (as we’ve discovered) when the device server is running. Out of curiosity, I tried reworking the MWorks interface to use the newer precompiled API library, instead of the source code version. As it turns out, this new version not only functions but even functions with the device server running. All my tests for MWorks’ DATAPixx interface pass without issue. Apparently, there have been changes made to the precompiled library that aren’t included in the source code version.

I found a description of the VPixx Device Server on the VPixx web site. It sounds like they plan on this being the standard way of interfacing with VPixx hardware going forward. It also sounds like, with the device server active, all communication between MWorks and the hardware will go through the device server. This seems like it would add unwanted latency to the connection between MWorks and the device, but the VPixx doc says it’s not an issue: “For timing critical experiments, the server is an approved solution for use with your VPixx devices.”

So, how would you like to proceed? I can make MWorks’ DATAPixx interface compatible with the VPixx Device Server, which should let you run PyPixx and vputil without needing to start/stop the device server, but you’ll have to live with the device server mediating communication between MWorks and the VIEWPixx. Or we can leave things the way they are, and you’ll need to stop the device server to use the VIEWPixx with MWorks, and restart it to use PyPixx or vputil. I’d probably pick the first option, since it will be most convenient for you, but the choice is yours.

Cheers,
Chris

Hi Chris -

Thanks for digging into this more! I appreciate it!

Let me reach out to VPixx to get their opinion on the limitations/benefits
of each of the two options.

Since we’re only just starting to use MWorks/VPixx - we’d obviously be
invested in pursuing the option that will be the best longer term solution.

Best,
Yasmine

OK, sounds good.

FYI, I just discovered that if MWorks’ DATAPixx interface is made to work with the device server, it won’t work if the device server isn’t running. I guess the new API can’t fall back on a direct connection if the device server isn’t available. This means you’ll have to install the VPixx software tools on any Mac you want to use with the VIEWPixx.

Chris

Hi Yasmine,

As of the current nightly build, MWorks’ DATAPixx/VIEWPixx interface is now built against the latest VPixx Software Tools for Mac. This means that you should be able to use vputil and PyPixx on the same system as MWorks. However, it also means that the VPixx Software Tools must be installed for MWorks’ DATAPixx interface to function, as the VPixx Device Server must be running to enable communication with the hardware.

Cheers,
Chris

Thanks for this edit, Chris.

We will download the VPixx tools - and then the nightly build.

Yasmine

Hi Chris,

We downloaded the VPixx software and Nightly build - both work seamlessly.
Thank you for incorporating this!

Kind regards,
Margaret

Great! Thanks for letting me know.

Chris