Reading Bar Codes to identify programs
Comments
-
I don't know what you really want to do. We build one machine for testing tires. Each tire has different dimensions and this is read by bar code scaner. Dimensions are send through the PLC via profibus to robot. Robot program is still running but with different parameters.0
-
Hi
I have used a barcode handscanner connected to the serialport on a S4C+ controller to read the barcode info.
It was used as a identifier for some meassuring values that later on was written to a DB on a PC.Per Svensson
Robotics and Vision Specialist
Consat Engineering0 -
Not sure about using bar code scanners but I imagine whatever you scan can be translated into a group signal for example. If you establish a product matrix associated with a unique identifier in that group signal then you can easily load and unload program modules. The number of bits in your group signal will determine how many individual programs you can call. For example here is something I am using:
PROC rRUNMODEL_S()
TEST nMODEL
CASE 98:
!MODEL NUMBER 98: RUNS A TEST SEARCH;
Load "HOME:/MODELS/STBD/SEARCH_S.MOD";
%"mainSEARCH_S"%;
UnLoadSave,"HOME:/MODELS/STBD/SEARCH_S.MOD";
CASE 240:
!MODEL NUMBER 240: RUNS A 240DA HULL PROGRAM;
Load "HOME:/MODELS/STBD/H240DA_S.MOD";
%"mainH240DA"%;
UnLoadSave,"HOME:/MODELS/STBD/H240DA_S.MOD";
CASE 250:
!MODEL NUMBER 250: RUNS A 250SLX HULL PROGRAM;
Load "HOME:/MODELS/STBD/H250SLX_S.MOD";
%"mainH250SLX"%;
UnLoadSave,"HOME:/MODELS/STBD/H250SLX_S.MOD";
CASE 260:
!MODEL NUMBER 260: RUNS A 260DA HULL PROGRAM;
Load "HOME:/MODELS/STBD/H260DA_S.MOD";
%"mainH260DA"%;
UnLoadSave,"HOME:/MODELS/STBD/H260DA_S.MOD";
CASE 261:
!MODEL NUMBER 261: RUNS A 260SD HULL PROGRAM;
Load "HOME:/MODELS/STBD/H260SD_S.MOD";
%"mainH260SD"%;
UnLoadSave,"HOME:/MODELS/STBD/H260SD_S.MOD";
ENDTEST
MoveAbsJ jHOME1_S,v1000,fine,tSPINDLE_S;
IF giMODEL=99 THEN
Set do_030HOME_s;
Reset do_019HKEEP;
ELSE
!CONTINUE
ENDIF
RETURN;
ENDPROCThanks,
ACB0 -
What directory does HOME refer to?
0 -
HOME refers to /hd0a/"your system name"/:Thanks,
ACB0 -
oops...
HOME is actually /hd0a/"your system name"/HOME:
Thanks,
ACB0 -
hello, i have tried to use the barcode scanner like mr PerSvensson, but my program it stops at
! write the first 5 characters to FlexPendantTPWrite ReadStrBin (channel, 5);
does anybody have any ideea, i have make de setup for barcode, 9600, 8 bits, stop bit 1 and all the settings but it seen like de computer does not receive nothing to display on flexpendatMODULE nustiuPROC Main()VAR iodev channel;VAR string text;VAR num bindata;VAR robtarget target;Open "COM2:", channel \Bin;! Clear input buffer for com2ClearIOBuff channel;! Wait for input from com2 and then! write the first 5 characters to FlexPendantTPWrite ReadStrBin (channel, 5);
!the program stop at up line! Read the new line charactertext := ReadStrBin (channel, 1);! Read the next input, interpreted as robtarget! and move robot to that targetReadAnyBin channel, target;MoveJ target, v20, fine, tool0;! Read text one character at the time! until end of filebindata := ReadBin(channel);WHILE bindata <> EOF_BIN DOtext := text + ByteToStr(bindata\Char);bindata := ReadBin(channel);ENDWHILETPWrite text;Close channel;ENDPROCendmodule0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings