Using the ConnectZBUS method always returns 0 for USB and USB3 interfaces
Tech Note: TN2302
Product: ActiveX
Version: All
Date Added: 2023-06-06
Issue
ConnectZBUS for the USB3 interface was added in v98. It will always return 0, even when successful. It also returns 0 for USB2 interfaces
Workaround
Use the RPcoX connection method for catching hardware connection issues. See example below.
zBUS = actxserver('ZBUS.x');
% USB3 devices
zBUS.ConnectZBUS('USB3') % always returns 0
% USB2 devices
zBUS.ConnectZBUS('USB') % always returns 0
RP = actxserver('RPco.x');
if RP.ConnectRZ6('USB3',1)
e = 'Connected'
else
e = 'Unable to connect'
end