BarcodeSCAN V120
BarcodeSCAN V120
BarcodeSCAN V120
Main Module
Subroutine: ! Main Routine
Configure COM initialization, and protocol configuration.
SB 2 SB 30 SB 31
Power-up bit Keypad Vars Refresh current
Locked(Standa LCD screen
MB 8
Ready to Scan
SB 2
Power-up bit PLC NAME COM INIT 2 PROTOCOL
V120 CO NFIG
MB 1
RS 232 Scanner
Function in
MI 50
Status
Initialize Protocol Scan
MB 8
Ready to Scan
PROTOCOL
SCAN
MB 2
RS 232 Scanner
Session
MI 60
Number of Bytes
MI 61
Index of
MB 2
Session
Complete
MI 35 [0]
Counter
When function is not in progress, copy the buffer from Protocol scan into MI: 0 (Displayed on HMI)
MB 2
Session PROTOCOL PROTOCOL
Complete CO PY BUFFER BUFFER RST
MI 0
RS 232 Scanner RS 232 Scanner
ASCII String
Parse Data
Strings
Str. To ASCII
MI 200
ASCII @
D# 0
Offset in
String find locates where in the string the ASCII variable is found numerically.
String Find
MI 0 MI 201
ASCII String ASCII @
MI 200
ASCII @
D# 0
String Find: C
Using string tools, string left, we select the string source and have it search all the way untill it hits MI 200 (our space)
This is then stored into a new location starting at MI8
String Left
MI 0 MI 300
ASCII String Left Part of
MI 201
ASCII @
If the string length varies, we need to know the string length to find the right half of the string.
String Length
MI 0 MI 202
ASCII String String Length
The right part of the string is (String Length) - (The amount of characters to the ASCII Space)
Subtract 1 for the ASCII Space, so that the right half of the string will not include the space.
MI 201 D# 1
ASCII @
Take the Right part of the string that's length is determined above.
String Right
MI 0 MI 400
ASCII String Right Part of
MI 203
Right String
D# 0
Offset in
String find locates where in the string the ASCII variable is found numerically.
String Find
MI 400 MI 205
Right Part of ASCII > Location
MI 204
ASCII >
D# 0
String Find: C
Using string tools, string left, we select the string source and have it search all the way untill it hits MI 205 (our space)
This is then stored into a new location starting at MI8
String Left
MI 400 MI 700
Right Part of Left Part of
MI 205
ASCII > Location
If the string length varies, we need to know the string length to find the right half of the string.
String Length
MI 400 MI 206
Right Part of Description
The right part of the string is (String Length) - (The amount of characters to the ASCII Space)
Subtract 1 for the ASCII Space, so that the right half of the string will not include the space.
MI 205 D# 1
ASCII > Location
Take the Right part of the string that's length is determined above.
String Right
MI 400 MI 800
Right Part of Right Part of
MI 207
Description
D
A
Vars Table
Var Alias Var Name Var Type
A Variable 2 ASCII String
B Variable 3 ASCII String
C Variable 7 ASCII String
D Variable 10 ASCII String
Vars Table
Var Alias Var Name Var Type
A Variable 11 ASCII String
Defined Fonts
HMI Information
Vision:
V120-22
Snap-in I/O:
V120-22-T1
Digital Inputs: I 0 - I 11
Digital Outputs: O 0 - O 11
High Speed Inputs:
I 0,1: None
I 0,1: None
I 2,3: None
I 2,3: None
Outputs
Address PowerUp Description
0
1
2
3
4
5
6
7
8
9
10
11
Timers
Reset
Address PowerUp Format Type Description
PW
Memory Bits
Address PowerUp Description
0 Refresh
1 Function in Progress
2 Session Complete
3 button
4 reset
5 Copy Complete
6 Refresh
7 Function in Progress Com 1
8 Ready to Scan
Memory Integers