Barcode scanner


#1

I’m using soft pac on a test machine development, in order to pick a test sequence recipe I would like to use a barcode reader thru either serial or USB port.
Is there any way to use one of the ports available at the PC? Do I have to get a special module for it?
Thanks!!


#2

Hello Ernesto,

Welcome to the OptoForums! Well, normally you’d pull in the data from a bar code reader using a Communication Handle in your strategy (be sure to check out my [B]101 post on comm handles here[/B]). The types of comm handles currently supported in soft pac / pac sim include: tcp, file, and ftp (not serial). In fact, serial ports on PCs are getting harder and harder to find.

Options to consider:

  • Do you have a PAC-S or PAC-R? (Both include a built-in serial port, or several.)
  • Perhaps your bar code reader has software to generate a file on the PC? (Which could then be read by a file comm handle in your strategy.)

A few other more-complicated options come to mind, but I’d ponder the simplest ones first!

-OptoMary


#3

p.s.

I’m also wondering: perhaps an app for that? I see various bar code reader apps, both iOS & Android, which could possibly beam data to somewhere that the PAC could access… wondering if anyone out there in OptoLand has used an barcode reader app? Sent data from it to PAC?


#4

In my experience with basic barcode readers, the USB drivers cause whatever is being scanned to be submitted as text, as though it were entered by the keyboard. In other words, if you have an active text field awaiting data entry, that data can be entered by keyboard, or by barcode scan. Having the PAC Controller interpret the barcode signal directly is not necessary if the barcode reader is connected through a windows machine running PAC Display.


#5

Thanks both for the fast response,
I think the best fit for my aplication is sensij option, which takes me to the next question, how do i get the field awaiting data entry?
Is that some thing I can get from Graphic Dynamic Attributes?
I’m using an E2 brain


#6

Hi Ernesto,

Are you already using PAC Display? (Maybe groov could be an option too?) In PAC Display, one of the “Graphic Dynamic Attributes” could be (on the right side) an “Operator Driven Attribute” where you Send String and use the radio button option “Prompt for data.”

You mentioned SoftPAC, which could be where the string would get sent to.

But I’m confused about where the E2 brain fits into this project?

Thanks,
Mary


#7

Thanks Mary
I didn’t explore Groob option yet, I’m using the EB2 brain to interact with an IO rack, softpack as the controller, PAC display for HMI and tinking on datalink for record DB at SQL. Is there anithing yousee I could do differnt? Better?


#8

Oh! E[B]B[/B]2 makes much more sense. We also have an E2 brain, but that’s a little more complicated to connect to those other parts you mentioned! BTW, coming soon in PAC Display (Pro) 9.4, you’ll be able to “squirt” data (highly technical term) into SQL, no extra datalink required.

But I digress. That all sounds good, just not sure what your barcode can do. Did you get the text from the barcode reader to just show up instead of typing, as sensij mentioned? (Maybe just in notepad for starters, before getting fancier w/a PAC display or [I]groov[/I] field?)

If you had an R2 brain instead of an EB2, you could use the 232 port on the brain. We also have a 232 module you could put on the rack w/the EB2 brain. I could tell you how to get the data from the barcode that way (we have folks doing that all the time). I’m just not sure your options on that particular barcode reader for getting the data into the PC in a way SoftPAC or an HMI could pick it up…


#9

Thanks for your patience Mary
Actually I’m able to get one of my actual barcode reader connected trhu USB port in to a note pad by just open notepad and scan it drirectly.
I was thinking on the extra module as an option, just wondering if I could use the actual PC ports to do that.


#10

Well, in that case, you could try sensij’s suggestion and have PAC Display prompt you for a string to send… to a tag in the strategy.

Instead of typing in the text, you’d scan it at the prompt, like this:

Have you tried that?