Jump to content

Strange com port behavior


Recommended Posts

I ran into some strange com port behavior and am hoping someone can offer some insight.

I have three systems deployed that use USB to 485 converters to talk to stepper motor drives. Each system has three drives and converters, each converter installs as a Com port. I am using Com3, Com4, and Com5. LabVIEW writes commands to the ports to control the motor speeds. LabVIEW runs on a laptop and the converters are connected through a USB hub.

System #2 started having lockup problems with the motor on Com3 -- the motor wouldn't respond. We replaced the converter and it has run fine for the last month. When the converter is phyically replaced, it installs a new Com port for it which I renamed to Com3.

System #3 had problems as soon as we tried to start it up on the production floor, after working fine in the lab during integration. The problem presented the same as System #2 -- the Com3 motor wouldn't repond to commands. With both systems the 'lockup' would start (if it was going to happen) when we started the control program and you could sometimes clear it by doing a complete reboot (power cycle the motor drives and shutdown and restart the laptop).

With System #3, I decided to dig a little deeper before just replacing the converter because we plan to deploy several more systems and we don't want to spend all our time chasing this issue. I inserted code to allow me to see the command being sent to each motor dirver and the driver response.

Of course once I had the monitoring code in place, System #3 worked fine. Since the issue appeared at start up I started cycling the system. After about 8 power cycles the lockup reappeared and persisted through several more power cycles.

The motors that were working (Com4 and Com5) showed the expected command and response. The response is an echo of the speed command with a linefeed and cursor character appended to the end.

The Com3 motor showed a response with just the speed command echo (no linefeed and no cursor character)

This is where it gets a little strange.

I disconnected the cable at the motor drive end and Com3 showed the same response even though it was no longer connected.

If I disconnected the Com4 or Com5 cable I would get no response at all.

I disconnected the Com3 converter from the USB hub and it still showed the command echo.

Now it gets stranger still.

If I change the port name from Com3 to Com6 (no change in hardware, just rename the port in the code and in the Windows device manager), the motor works. To get the name change to take I have to do a complete reboot, so I wasn't sure if it was the name change or the reboot that 'fixed' things.

I switched back and forth between Com3 and Com6 four times.

Everytime the motor works with Com6 and doesn't work with Com3 (same false command echo with no cursor at the end).

The manufacturer of the motor drives and converters hasn't seen this before and they suspect it has something to do with the Com3 in Windows (32bit Win7) or that maybe some other program is messing with Com3. The 'other program' theory is possible, but not likely in that the laptops were purchased new for this application and the only things installed have been LV2009, MAX, and the motor driver utilities. I don't think this laptop has even been online because I used LV2009 in evaluation mode only before installing the program as an exe.

System #3 has been running fine for the last week using Com6, although that probably means it has only gone through 3 to 5 power ups.

Has anyone seen anything like this? Is Com3 in some way different than Com4, Com5, or Com6?

Any thoughts or insights are appreciated.

Thanks,

Steve

Link to comment
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.