Hello,
Is there any way to get some information about the USB location of a PLIN-USB using the PLIN-API?
We're using two adapters on one PC and we would like to simplify to replacement in case of a breakdown.
We know that one way to accomplish such requirement is editing and using the Hardware IDs, but this is always a manual setup.
Our idea is to use the USB location to figure out which PLIN is connected to which bus.
Thanks in advance!
Best Regards,
Mário.
PLIN-API USB location
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: PLIN-API USB location
You could set a unique Hardware ID for each Device within the Control Panel APP.
At the moment this is the only solution. There is no "fixing" of the Device to a LIN Channel (like we have implemented it on the CAN units)
With the Software API you could read the ID back, and so could decide wich PLIN-USB Device is on which LIN Channel.
At the moment this is the only solution. There is no "fixing" of the Device to a LIN Channel (like we have implemented it on the CAN units)
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
-
- Posts: 3
- Joined: Fri 8. May 2020, 21:06
Re: PLIN-API USB location
Thank you for the reply.
I'm currently implementing the update of the HardwareID with the API but the ID is not really updating.
When I execute the SetHardwareParam everything goes fine, but when I read it back the value doesn't update (I've confirmed with PLIN-View PRO).
Any ideas?
Best Regards,
Mário.
I'm currently implementing the update of the HardwareID with the API but the ID is not really updating.
When I execute the SetHardwareParam everything goes fine, but when I read it back the value doesn't update (I've confirmed with PLIN-View PRO).
Any ideas?
Best Regards,
Mário.
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: PLIN-API USB location
Have you test if you could set the ID with Control Panel - as we wrote in our last post? If yes, could you read it with your code back?
Does this work ? We could give you a short C code example how to Set & Get the parameter - simply send us a e-mail to support[at]peak-system.com
Does this work ? We could give you a short C code example how to Set & Get the parameter - simply send us a e-mail to support[at]peak-system.com
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
-
- Posts: 3
- Joined: Fri 8. May 2020, 21:06
Re: PLIN-API USB location
Yes it works fine, if I set the ID with PLIN-View PRO, I can read it back in my app.
I found out the problem, I was setting wBuffSize to 0 as you can see in the picture of my last post. Now that I understand the purpose of such parameter it's weird that the method accepts it to be 0 without "complaining".
Thank you for your support.
Best Regards,
Mário.
I found out the problem, I was setting wBuffSize to 0 as you can see in the picture of my last post. Now that I understand the purpose of such parameter it's weird that the method accepts it to be 0 without "complaining".
Thank you for your support.
Best Regards,
Mário.
- PEAK-Support
- Sales & Support
- Posts: 1646
- Joined: Fri 10. Sep 2010, 19:34
Re: PLIN-API USB location
It is a global function that call different subfunction depending on the Parameter (which make it flexible for new features without changing the API)
So a validation is nearl impossible, because there exist parameters where a zero is OK.
So a validation is nearl impossible, because there exist parameters where a zero is OK.
--------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------
PEAK-System Technik
Technical Support Team
support[at]peak-system.com
-------------------------------