Connecting AB PLC to a USB device

P-Nasty

Member
Join Date
Oct 2021
Location
Maine
Posts
11
Hello, all! I’m having an issue with a new machine my company is designing. I’m trying to figure out if certain solutions are do-able, and from there which ones might be worth pursuing. I'm OK with doing a lot of learning as I go as long as it's towards something that's possible to achieve.

Background:

We need to make a precision measurement with a probe. The probe currently connects to a ~$900 handheld instrument that makes the measurement, does some math, and displays the measurement on the screen. We have several of these on-hand already. The handheld instrument can be hooked via USB (it has a micro USB port) up to a PC -- using Hyperterminal, according to a brochure from the manufacturer. It can send the measurements and receive commands via ASCII strings over this USB port.

The other option is to spend $5500 for a replacement to the handheld terminal for one “designed to talk to for automation." Then either ~$500 on an RS232 I/O module or an unquoted upgrade to make the terminal talk via profinet plus the cost of a profinet gateway since I am using an Allen Bradley PLC. In short, around $6000.

Whatever process we go with, we will likely be duplicating on future machines, since the company is marketing itself as more of a precision manufacturer. This ~$5000 in equipment savings will be duplicated (several times per year, for several years), so it’s definitely worth the time to lower these costs. I got my bachelor’s in MechE this last May, so I’m making entry-level MechE pay. I can justify spending some time on this.

Solutions:

I have a few ideas. Solution 1 is to just spend $6k on every machine going forward on the expensive terminal and whatever gateway I’d need.

Solution 2 is an ethernet to USB adapter, then USB to micro USB adapter, and run an ethernet cable to one of the ethernet switches connected to the AB PLC. Links for example adapters are at the bottom. Does anyone have any experience doing something like this? My background isn’t in IT stuff, and I just learned on the last machine I worked on that ethernet cables use more than 1 type of communication protocol. Quite the learning experience. Would it be likely that I could make a generic .eds file for the handheld terminal, and send/receive strings straight from the PLC?

Solution 3 is similar to 2, but I found a gateway that does basically the same thing as the adapter. The link for an example gateway is at the bottom. Is the gateway the same thing as the adapter but at ~10x the price?

Solution 4 would be to buy a raspberry pi or low-end PC and stick it in the machine’s electrical cabinet. Then fumble my way through making a python program that receives commands from the PLC via ethernet, and sends/receives data with the terminal via USB. Does anyone have any experience with that? Does that sound do-able, specifically the PLC to PC/Pi connection? I wrote a couple Python programs in college for school work, so I feel like the PC/Pi to handheld terminal communication is in the realm of “known unknowns” in that I know where to start googling to make this happen if it I need to. This seems like a potentially attractive solution in the long run, because this could also potentially be expanded later down the road (on this or future machines) to include saving the measurements and e-mailing them to production management/customers.

Solution 5: We have a lot of in-house vision system talent. My boss and I discussed mounting the $900 handheld terminal inside the machine. The robot that's already going to be inside can press buttons on it. We could put a camera with character recognition in there pointing at the handheld terminal. My company has some decent discounts with Keyence because we buy a lot of stuff from them. I installed a few vision systems in existing equipment that had decent shape recognition software built-in, and the setup was $1600 for all the equipment/software. I imagine a version with character recognition wouldn't be too much more. It needs to come in under $5000 (after discounts) to save money. I haven't talked with Keyence yet because I hate the idea of pointing a camera at a piece of equipment that has a communication port on the side.

To wrap up: Which (if any) of these solutions sound possible? Which would you recommend pursuing?

Thanks!


Ethernet to USB could be something like this: https://www.alliedelec.com/product/...riYkrBY_5FUfVsxymsRoCIRgQAvD_BwE&gclsrc=aw.ds

USB to micro USB could be something like this: https://www.alliedelec.com/product/...4Y2ZebT3Ia1ksNxF-JBoCIykQAvD_BwE&gclsrc=aw.ds

Ethernet to USB gateway is something like this: https://www.express-inc.com/Product...P9dFvfgfttyeHkW5eXMOktgo4mUWfs8hoCHMgQAvD_BwE
 
You need a USB driver for the probe to connect to anything. You probably have a driver and an application program for Windows, and that is what is displaying the measurements.
Chances are that the manufacturer has something for Linux - driver AND application program, and you can use that on a Ras PI.
I have something similar for a USB loadcell, where the manufacturer has an API that you can write a custom application program with, on Windows or Linux.
The ability to send ASCII is probably via a virtual serial port which the USB device mimics. Again, it requires a driver for Windows or Linux.

The various adapters you are considering wont work for connecting a PLC to the USB probe. There wont be a driver to install on the PLC, and how could there be ?

Is the probe a secret ? If not, we could take a look at what is possible.
Does the probe have an OPC Server, or an OPC UA Server ?
Does it support some kind of open standard, Modbus, Modbus TCP ?

The best is if the probe already has some industrial protocol.
If that is not possible, a Windows IPC or a Raspberry PI with a custom program to get the data to the PLC would be the only solution that I can see.

edit: Your suggestion #5 makes me think that this whole thing is a joke. Funny idea, but ......
 
Last edited:
In my research for the before mentioned USB loadcell, I found out that at some time the USB part was actually simply added to the existing logic on an older version of the loadcell which had an RS232C interface. So there were older variants of the USB loadcell that had a serial interface instead of USB. It was of no use to me, but I guessed that if I wanted to I could get the older version and connect it to the PLC via a serial interface and exchange data via ASCII.
Chances are that the same applies to your 'probe'. Does the manufacturer have a version with serial interface instead of USB.
 
Welcome to the PLCTalk forum community !

If it were me I would start researching Solution 4, using a hardware middleware device based on Raspberry Pi. You can do your prototyping on the inexpensive hobbyist hardware, then get a Compute Module based industrial unit (Kunbus, ModBerry, etc) for your actual production machines.

Since you do have some Python experience, you might want to keep it simple and write a Python program using an A-B communication library like PyLogix. We are fortunate to have the principal author of that library as one of our members on this forum.

Or, you could use a low-code approach like Node-Red, which has both serial and A-B EtherNet/IP libraries, and is free and easy to use.

Or, you could use a more industrialized approach like CoDeSys running on the Raspberry Pi, which can run like an I/O adapter on EtherNet/IP or ProfiNet. The licenses are very inexpensive ($60-100 USD).

Step One is going to be figuring out if the Raspberry Pi has a driver for the USB serial chipset in that probe. The first step of that process is just plugging it in and running lsusb or usb-devices from the command line.
 
Wow, I posted this then went to lunch. Thanks for all the replies!

There's nothing secret about this. It's for electroplating. I figured it didn't matter to the discussion.

The probe is from Fischer, and then that connects to either an FMP 10 as a handheld terminal or to an MMS PC2.

MMS PC2 page: https://www.helmut-fischer.com/products/fischerscope-mms-pc2

FMP 10 page: https://www.helmut-fischer.com/products/dry-film-thickness-gauge-fmp10-fmp40

Solution 5 is one of those "it's a joke until it isn't" solutions. My boss and I had a laugh when he suggested it, but it does look like it might be cheaper than a new MMS PC2. We are already putting ~$30,000 of cameras/camera equipment on this machine. What's one more?

I don't have much info on the probes specifically (I'm not 100% sure which of the ones the terminal works with we actually will be using), and I have been having trouble finding more technical info on MMS other than stuff that's roughly marketing-level brochures.

Here's the operator's manual for the FMP 10. https://vdocuments.mx/fischer-dualscope-fmp10-20-instruction-manual.html

Page 80 is where USB connection/control starts
 
There are MMS PC2s on ebay in the $2000 range, and we're not against putting stuff from ebay into new machinery, though it would be nice to find a cheap solution with all-new equipment. This is a probe we might be using regularly in the future, and ebay may not always have good prices.
 
Welcome to the PLCTalk forum community !

If it were me I would start researching Solution 4, using a hardware middleware device based on Raspberry Pi. You can do your prototyping on the inexpensive hobbyist hardware, then get a Compute Module based industrial unit (Kunbus, ModBerry, etc) for your actual production machines.

Since you do have some Python experience, you might want to keep it simple and write a Python program using an A-B communication library like PyLogix. We are fortunate to have the principal author of that library as one of our members on this forum.

Or, you could use a low-code approach like Node-Red, which has both serial and A-B EtherNet/IP libraries, and is free and easy to use.

Or, you could use a more industrialized approach like CoDeSys running on the Raspberry Pi, which can run like an I/O adapter on EtherNet/IP or ProfiNet. The licenses are very inexpensive ($60-100 USD).

Step One is going to be figuring out if the Raspberry Pi has a driver for the USB serial chipset in that probe. The first step of that process is just plugging it in and running lsusb or usb-devices from the command line.

Thanks, Ken!

I've never used a Rasberry Pi, just figured it was one of the skills I'd pick up on the next project. I had no idea there were even industrial ones. I was thinking over lunch that maybe I'd 3d print a cover for one since all I'd ever seen were the hobbyist ones.

I think most suggestions that I've gotten seem to include just cutting out the terminal (handheld or the MMS PC2) and having the probe wired directly to the PC/Pi/PLC if possible. The terminals are doing some measurements that are a bit over my head. I was just going to treat probe+terminal as a black box that gives plating thickness measurements, and I need to figure out how to get that info from them
 
The MMS PC2 Brochure mentions "Optional: connection for PLC integration".

Might be worth the time tracking down what that entails as it could be the solution

Edit: Bah I see now you have a handheld unit, the MMS pC2 was one of your options my bad.
 
Very interesting. I perused the manual, and hidden in the troubleshooting chapter it says:
So that begs the question if the probe is one of these two things.

Thank Jesper and L33er. I am scheduling a phone call with Fischer to get some more information about these devices, I'll be sure to ask that. If it is, then that gateway would be the easiest solution.
 
Very interesting. I perused the manual, and hidden in the troubleshooting chapter it says:
So that begs the question if the probe is one of these two things.

The MMS PC2 Brochure mentions "Optional: connection for PLC integration".

Might be worth the time tracking down what that entails as it could be the solution

Edit: Bah I see now you have a handheld unit, the MMS pC2 was one of your options my bad.

Yeah the biggest goal is to not need to purchase an MMS PC2 at all and just use he handheld terminal. The optional connection for PLC integration uses Profinet protocol, so I'd need a ~$500 gateway plus whatever the expansion costs, plus the $5500 MMS PC2. I'd probably just use the RS232 port and an RS232 I/O module (~$500) for CompactLogix 5380 series PLCs. We're likely going to use a 5069-306ER. It seems like $500 seems to be a standard minimum price for PLC related stuff.
 
There are a couple of alternative handheld devices FMP30 and FMP40 where it says:
Additional features with FMP30 and FMP40
[..]

COM interface option in addition to the USB interface
Also worth investigating.
If possible, I think that the best solution is the one that requires the fewest transitions from measurement to the PLC.
Too many hardware and software transitions makes it a nightmare to develop and troubleshoot.
 
Jesper, you may have struck gold with that. Didn't realize there was an intermediate model that has the connection I want. I asked them for a quote, so we'll see how that goes. A 5069 Serial module to go onto the PLC is in the $500 range, so if the FMP30 is reasonably priced, that might be the best way to get these measurements onto the PLC.

Edit: It looks like I'll be learning a lot about string commands in Studio 5000 soon.
 

Similar Topics

please using the usb can i assign any ip address that i want ?
Replies
4
Views
157
Hello everyone, first of all thankyou for all the help you've given me through other peoples' Q&A's. My situation is; -I am halfway through...
Replies
14
Views
4,578
I have 2 PLCs. One is networked to our plant, and the other is networked to the first PLC via a 1756-EN2T. I could easily get the second PLC...
Replies
3
Views
58
Good Day to all of you, this is my first post, i will try to explain as best as possible, english is not my natural language. I am performing an...
Replies
0
Views
64
I haven't encountered problems connecting to a PLC through VM Ware but I am with this particular machine. I'm running Windows 7 on a Windows 10...
Replies
8
Views
253
Back
Top Bottom