08-18-2022 07:57 AM
@nikvl wrote:
I wonder what would happen once all the COMS are assigned? Would there an error?
Tbh, I never really understood how exactly the COMs ports are assigned. But through my work I'm using a lot of USB to XXX adapters (most of the time using FTDi chips) and we have some -very- old computers running some tests. And very often we plug in a new adapter. We never came across an issue of all COM ports being used. And I think that's because they are automatically re-assigned. You will face an error if you plug more than 256 devices at the same time (if I understood well this article).
What also happened to me in the past is that I used the alias re-naming function in NI-max once because a computer was connected to too many stuff and it became annoying to remember and find the right one by chance, but one day, while connecting something completely different, the same alias popped-out in my VISA ressource name control, which led me to the assumption above.
08-18-2022 08:29 AM
@VinnyAstro wrote:
Tbh, I never really understood how exactly the COMs ports are assigned. But through my work I'm using a lot of USB to XXX adapters (most of the time using FTDi chips) and we have some -very- old computers running some tests. And very often we plug in a new adapter. We never came across an issue of all COM ports being used. And I think that's because they are automatically re-assigned. You will face an error if you plug more than 256 devices at the same time (if I understood well this article).
What also happened to me in the past is that I used the alias re-naming function in NI-max once because a computer was connected to too many stuff and it became annoying to remember and find the right one by chance, but one day, while connecting something completely different, the same alias popped-out in my VISA ressource name control, which led me to the assumption above.
Yeah I use lots of USB fr communication but most of the time the USB-serial interface is a single, separate, constant part that I work with so I never really thought about how this might influence the COM ports other than occassionally manually reassigning them in the device manager. However, I have a hunch about how I might get around this but I'm currently away from my instruments. Will report back if it pans out.
08-18-2022 08:30 AM
Otherwise, given your initial problem, in my company we have somehow a similar issue: We have a lot of already connected devices, and it's a pain to go through all of them and find the right one. So I developed this VI that automatically detects when a device is connected to a COM port and automatically sends this out (or in my case connects to it)
I've made it more "general case" than what I use it for.
It does require that your device is not connected when you run the VI though.
Hope this helps.
VInny.
08-18-2022 08:34 AM
@nikvl wrote:Yeah I use lots of USB fr communication but most of the time the USB-serial interface is a single, separate, constant part that I work with so I never really thought about how this might influence the COM ports other than occassionally manually reassigning them in the device manager. However, I have a hunch about how I might get around this but I'm currently away from my instruments. Will report back if it pans out.
I personally never had to manually reassigned anything. I've never faced any duplicates in the COM port or errors due to something similar to this. So I assumed that windows is friendly enough to do that by himself (which could lead to the issue I had where a device's alias that I named "Motor" was used for a completely different device...)
08-18-2022 08:37 AM
@VinnyAstro wrote:
Otherwise, given your initial problem, in my company we have somehow a similar issue: We have a lot of already connected devices, and it's a pain to go through all of them and find the right one. So I developed this VI that automatically detects when a device is connected to a COM port and automatically sends this out (or in my case connects to it)
I've made it more "general case" than what I use it for.
It does require that your device is not connected when you run the VI though.
Hope this helps.
VInny.
Thank you. This looks interesting, will have to try it out when I get back. Say, did you do something to the .vim search 1D-Array? Yours outputs a boolean and the standard LabVIEW one the index of element...
08-18-2022 08:54 AM - edited 08-18-2022 08:55 AM
nope, I'm using the Search Sorted 1D Array.vim located here which is different from the Unsorted one. And because Find VISA already sorts the array...
I still need to update my QD shortcut for it, s1d was practical, but still send to the "normal" search 1d array vi which apparently is not supported anymore
08-18-2022 08:57 AM
@VinnyAstro wrote:
I still need to update my QD shortcut for it, s1d was practical, but still send to the "normal" search 1d array vi which apparently is not supported anymore
The primitive is still supported, it just isn't in the palettes anymore. But if you dig deep enough in the VIM, you will find the primitive.
08-18-2022 09:24 AM
@crossrulz wrote:The primitive is still supported, it just isn't in the palettes anymore. But if you dig deep enough in the VIM, you will find the primitive.
Yes that's true, I found it once, but I just find annoying to not have the easy shortcut working and have to adjust it 🙂
08-18-2022 09:53 AM
@VinnyAstro wrote:
@crossrulz wrote:The primitive is still supported, it just isn't in the palettes anymore. But if you dig deep enough in the VIM, you will find the primitive.
Yes that's true, I found it once, but I just find annoying to not have the easy shortcut working and have to adjust it 🙂
Give this thread a good look through: https://forums.ni.com/t5/LabVIEW/Search-1D-Array-Changed-in-2020-SP1/m-p/4114744. Somewhere in there are a couple of setup VIs for adding the primitive back into the palette. I don't remember if the primitive was added back in 2021 or if I "fixed" it a long time ago.
08-19-2022 03:28 AM
We have a testing PC with the same problem, we use ComPortMan, completly worth it.
You can define fixed ports for specific devices and ports for constantly switching devices to be a specific port.
Timo