Jump to content
Sign in to follow this  
nkhan

Panel USB to RS232 Communication

Recommended Posts

Im having issues with getting communication from a Unistream 7 to a syringe pump through a usb to RS232 cable. I am trying to use the message composer to send commands over but have not been successful. The brand of pump I am using is  Chemyx (https://www.chemyx.com/support/knowledge-base/programming-and-computer-control/serial-rs232-commands/)

The cable is good as I can take that same cable, connect to a PC, connect thru putty thru its COM port, and type commands without an issue. 

I enabled "USB for Serial Communication" under the PLC communication tab only changing the Baud rate to 38400 and message composer was setup with text strings following Unistreams guide but I was not successful in getting communication (http://support.unitronics.com/index.php?/selfhelp/view-article/unistream-and-communication-with-3rd-party-devices).

Any ideas as to why I cant send a "start" string or "stop" string? Also does it matter if I use USB 1 or 2? Would a UAC-01RS2 serial module help? I am using the microusb port to connect to the PLC if that matters

Thanks

Share this post


Link to post
Share on other sites

I don't think the mini USB port is included in ports you get access to.  If you look at the PLC picture in the Panel USB Port you'll see a highlight box drawn around the rectangular Type A ports.  The hardware specification lists the mini port as a device, and the Type A ports as hosts.

I'd try moving your cable on the PLC.

Joe T.

Share this post


Link to post
Share on other sites

Maybe I was not clear. The microusb is being used for programming and is connected to my PC. The pump is connected to the Type A Host ports. I tried disconnecting the PC before testing but still no luck. I thought maybe there could be interference between programming port and host port utilization. 

Share this post


Link to post
Share on other sites

I think I read somewhere that only USB-Serial adapters that used the Prolific drivers would work.

It would benefit me if some other common drivers were also ported into the Unistream.

Share this post


Link to post
Share on other sites

Mainly a related FYI.

The major problem with USB-Serial adapters is that there are a myriad of poor quality devices on the market, most of them knock-offs of the expensive known brands (who have done all the hard work developing them in the first place).   Often they don't work, or work poorly, and to make matters worse they all use their own drivers which can play merry hell on your PC.

This thought covers all manner of things that initially appear to be USB, but often are a device that used to be serial but has now simply had an onboard chip fitted and will install it's own serial drivers when plugged in and show up as a comm port.

So that could be a reason for your read that only Prolific are in use. 

I always check something over very carefully before first time plugin, and also do a system image or at least a restore point.  Until you have personally encountered this driver issue, you might think I am over-reacting.  But know that this advice will save you days of heartache!

cheers,

Aus

Share this post


Link to post
Share on other sites

Just an update in case others stumble upon this thread. 

After also trying a serial module (UAC-01RS2) and also having no luck. I started to dig into the hardware manual of the pump I was trying to communicate with.  It was saying to include a /r and /n after text commands, however finding a labview program for the pump and going into their functions, it was really Return Carriage and Line Feed that was being sent over with the ASCII text command, not just /r /n. 

So adding an ETX in the unilogic message composer of ascii characters 13 and 10 for RC and LF, I was finally able to get my project done. After that ETX it was smooth sailing. I was able to communicate with both the USB panel and the serial module without issues. 

Share this post


Link to post
Share on other sites

Thanks for the update and your solution.

Serial communications with a PLC can be quite vexing.  I always recommend using a PC with a raw terminal program such as Bray's  to look at the actual characters coming out of the PLC and to drive the end device with a known string from the terminal.  I should have brought this up earlier in the thread.

Joe T. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
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.

Sign in to follow this  

×
×
  • Create New...