how to control two fx3 usb respectively?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
fumac_3907466
Level 1
Level 1

I will use two fx3 usb to communication with my devices. When I use the friendlyname to get the usb name. I only get one usb name, and I only control the newest opened usb. how to control two fx3 usb simultaneously and respectively?

CCyUSBDevice*   m_pCyUSBDevice;

for (UCHAR i = 0; i < m_pCyUSBDevice->DeviceCount(); ++i){

        bool isOpen = m_pCyUSBDevice->Open(i);

        if (isOpen){

            QString friendly_name = m_pCyUSBDevice->FriendlyName;

}

}

0 Likes
1 Solution

Hello,

Please follow up on the thread how to identify which one is removed?

Best regards,

Srinath S

View solution in original post

0 Likes
3 Replies
SrinathS_16
Moderator
Moderator
Moderator
1000 replies posted 750 replies posted 500 replies posted

Hello,

To access the devices separately, the CCyUSBDevice->VendorID/ CCyUSBDevice->ProductID combination of the device's descriptor can be used. Alternatively, you can define a unique serial number string in the device descriptor and can be checked on the host application using the CCyUSBDevice->SerialNumber.

Best regards,

Srinath S

0 Likes

Thanks for your kindly reply. if i control two usb.

CCyUSBDevice*   m_pCyUSBDevice1;

CCyUSBDevice*   m_pCyUSBDevice2;

m_pCyUSBDevice1->Open(0);

m_pCyUSBDevice2->Open(1);

However, if remove one usb.

m_pCyUSBDevice1->Isopen = true;

m_pCyUSBDevice2->Isopen = true;

1. How to identify which one is remove?

2. If the removed one is inserted, how to open it?  I don't know which one?

3. Could you help to descripe the solution by codes more detail?

SrinathS_16

0 Likes

Hello,

Please follow up on the thread how to identify which one is removed?

Best regards,

Srinath S

0 Likes