https://www.automationdirect.com/p3000 (VID-P3-0049)
How to use the Productivity3000
Live demo showing you how to setup and use a Bar Code Scanner on both a local base and a remote base with ladder logic and PLC programming on the Productivity3000 PLC/PAC.
The bar code scanner used in this video was a Symbol LS2208 and the RS232 cable was a custom hand wired cable to get all the signals to line up:
Male....... Male
DB9........ RJ12 (6-pin)
...5............. 1
...2............. 3
...3............. 4
Check out all of our videos at https://www.AutomationDirect.com/Videos
To subscribe: https://www.youtube.com/user/automationdirect?sub_confirmation=1
Facebook: https://www.facebook.com/AutomationDirect
Twitter: https://twitter.com/AutomationDirec
LinkedIn: https://www.linkedin.com/company/automationdirect
**Prices were valid at the time the video was released and are subject to change.
Getting a bar code scanner up and running on some PLCís can be a real hassle. With the Productivity3000 using a Bar Code Scanner is a snap. Letís do it: Step 1: Plug the scanner into the serial port on the front of the CPU. Step 2: Hardware configuration: We want to do an ASCII IN ñ this one right here ñ but when I go to find the serial port it says there is no ASCII serial port configured. Well, the reason for that is we havenít set it up yet. So letís cancel out of this. To do that we bring up the hardware configuration. This dialog. We want to read the configuration of the current controller. If this button is not active, check and make sure your controller is in STOP mode ñ it has to be in STOP mode to read the configuration. So Iím going to click on the button, and weíll wait a few seconds while the controller does a full auto-discover of the entire system. This dialog is telling me there is a mismatch between my new project and the base. Of course, I know that. And we now have a fully auto-discovered set of hardware. To view it, I can just click on the local base group. This is the PLC I currently have plugged in. For now, we just want to double click on our processor, which brings up this dialog box. We go over to our serial ports and set them up. Letís give this one a name ñ we know we are going to plug our scanner into it ñ so weíll call it ìscanner.î The protocol defaults to Modbus RTU. We want to read ASCII so letís change that to an ASCII protocol ñ make sure you donít miss that one. This particular scanner operates at 9600 baud. Odd parity, 8 data bits, one stop bit ñ thatís correct. Our serial port is setup. OK out of the port window and close the hardware configuration window. Now we can go grab the ASCII IN instruction and just fill in the blanks. The Productivity 3000 has already filled in the serial port for us because there are no other serial ports. We want a fixed length message. For this example we want 10 characters ñ youíll see why in a minute. And I just need a place to put the answer. So letís call that ìScannerString.î And thatís it ñ thatís all we need to do to interface to the scanner. If we hit OK, we see that the software is smart. It sees that we havenít actually created that memory location for the barcode string yet, so it asks us if we want to do that and even suggests what type it should be ñ a string in this case. This looks pretty good to me, with one exception Ö I know I want my string to be 10 characters long. Youíll see why in just a minute. So I say OK and in one fell swoop we setup our scanner and we have allocated the memory for the string to go into ñ a 10 character string. While we are here, letís do one more thing. Letís send that Scanner String result to the LCD on the processor. Thatís easy. We just come down here, grab the LCD instruction, and drop it on the next rung and fill in the blanks. On the first line of the LCD, letís just put some TEXT. You can put anything you want, just enclose it in double quotes. Letís say ìBar Code:î Then on the third line ñ letís skip a line ñ and on the third line letís tell it to put the contents of the scanner string. If I just start typing the software brings up all the TAGs in the database, so I grab the one I want, and say OK. And thatís it. Step 1: was read the Hardware Configuration and setup the serial port for ASCII. Step 2. Was setup the ASCII IN command to handle the scanner. And step 3 was send the result to the LCD page. It just doesnít get any easier than that. Letís turn on our monitor and go ahead and scan a bar code. And as you can see, the message appeared both here in Scanner String and over here on the LCD display of the CPU. Let me do another one, and we got a new bar code. So in a matter of seconds we were able to setup a full barcode scanner system with the Productivity 3000. What if I wanted to connect the Bar Code Scanner to a Remote Rack? Easy. I just connected a remote slave through a Stride Ethernet switch to this base. Well, we just do the exact same thing we did before. Step 1, read the configuration ñ remember, you have to be in STOP mode for this button to light up, there it is. Read the configuration ñ it goes out and reads the entire system in one fell swoop, auto discovers all the hardware. It found a new remote base and asks me if I want to add it to the project. I do. Here are our two bases. Here is our local base and our remote base. I double click on the remote base and I see how it is populated. Double click on his processor, and setup the serial port. Its name is currently RS232. We can do better than that, letís call him ìRemote Scanner.î We want to make sure his protocol is ASCII. Set him up for the right baud rate: Odd, 8 and one. So now our remote slave serial port is setup and ready to go. That was step 1. Step 2 ñ we go back to our ASCII IN and we said we want the ASCII IN to come from our Remote Scanner, not our local scanner. And while we are at it, letís go ahead and send the scanner result ñ which is going to appear in Scanner String ñ to the remote slave LCD. Well, to do that we just pick the LCD we want. Do we want the CPU LCD or do we want the remote Slave LCD? Everything else is the same, and away we go. Letís transfer this project to the controller. Iím going to reach down and flip the switch on the processor back to RUN mode ñ we can see the status right here change to RUN. And we are ready to go. Iím going to reach over and scan a bar code. And sure enough that bar code appears here and on the LCD display. Letís try another one. And how about one more. Well, thatís all there is to using a Bar Code scanner with the Automation Direct Productivity 3000. Both on the local base and a remote base. Be sure to check out the other videos in this series for more ways to get up and running quickly with this controller. And as always, please send us any comments you may have, we appreciate the feedback. Performance plus Value Ö Thatís Productivity. From AutomationDirect.
Voted #1 mid-sized employer in Atlanta
Check out our
job openings