LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need ideas for auto-identifying a device connected to a serial port

We manufacture a product that uses a stepper motor controller. We communicate with the stepper motor controller through a serial port. We have different configurations of this product. We also have several generations of this product that are using different stepper motor controllers. Because of this we also have several different versions of the software available to cover the different unit. I am in the process of re-writing the software with the idea of having one version cover all our different units. What I would like to know is if it is possible to identify which unit is plugged into the serial port so the software will load the appropriate driver and configuration? I was thinking maybe somethi
ng could be built into the serial cable that would be specific to a unit? Any ideas would be helpful.
0 Kudos
Message 1 of 5
(2,933 Views)
Terry,

the best way is to have an ID-String in your units that could be polled by the PC. MEasuring devices often use a commant like *IDN? and the unit answers with their product id (and this ID might include sw vs).
Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 5
(2,933 Views)
If you don't use hardware handshaking you can use the three inputs CTS, DSR and RI of the serial interface to code something into your cable. This way you can detect 8 different products.
If you have more than 8 different products or you use handshaking than you must use a command to get the product information.

Waldemar
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 3 of 5
(2,933 Views)
Terry,
another idea I played with (for teststands in my case):
Using an USB Memory stick 'wired' to the product.
That stick can hold all Information, Parameters even your software (.exe and lvrt.dll and serdrv.dll for Windows)
so you should be able to run your software from whatever PC (with windows that support USB) without installing drivers or software.
And you can get these Sticks for the same price you can pay for HQ Serial cables from certain vendors 🙂

Greetings from Germany
Henrik
Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 4 of 5
(2,933 Views)
The software ID simplifies your hardware interface: you can use a 3-wire cable. It also gives you great flexibility in how you identify your products.
The *IDN? mentioned by Henrik is commonly used in GPIB instruments.
0 Kudos
Message 5 of 5
(2,933 Views)