BarcodeSCAN V120

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Module: !

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

Reset the information stored in the buffer

Parse Data

R:\BABU_GT2\BarCodeSCN_V350.vlp Page 1 of 13 16 December 2023


RET

R:\BABU_GT2\BarCodeSCN_V350.vlp Page 2 of 13 16 December 2023


Module: ! Main Module
Subroutine: Parse Data
String to ASCII, using the Space as the seperating variable within the string will allow us to seperate the string into two seperate pieces.
In order to do this we need to assign an MI to the ASCII string variable we are looking for.

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 202 MI 203 MI 203 MI 203


String Length Right String Right String Right String

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

R:\BABU_GT2\BarCodeSCN_V350.vlp Page 3 of 13 16 December 2023


Strings
Str. To ASCII
MI 204
ASCII >

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 206 MI 207 MI 207 MI 207


Description Description Description Description

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

R:\BABU_GT2\BarCodeSCN_V350.vlp Page 4 of 13 16 December 2023


RET

R:\BABU_GT2\BarCodeSCN_V350.vlp Page 5 of 13 16 December 2023


Element :Com Init
Module: ! Main Module
Subroutine: ! Main Routine
Net: 2
Details :
Com Port: COM2
Baud Rate: 9600
Data Bits: 8
Parity: None
Stop Bits: 1
Flow Control : No
Ignore Break : No
Standard : RS232
Use Modem: No

R:\BABU_GT2\BarCodeSCN_V350.vlp Page 6 of 13 16 December 2023


HMI Display: ! Start-Up Display

D
A

Jump Condition Display


SB 52 - Right Arrow Set

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

Var Type: ASCII String


Var Name: Variable 2
Linked Operand: MB 6 - Refresh
Features:
Start Vector: MI 300 - Left Part of String 1 of 1
Vector Length: 13
String Pattern: Text_To_Display

Var Type: ASCII String


Var Name: Variable 3
Linked Operand: MB 6 - Refresh
Features:
Start Vector: MI 700 - Left Part of Description 1 of 1
Vector Length: 20
String Pattern: Text_To_Display

Var Type: ASCII String


Var Name: Variable 7
Linked Operand: MB 6 - Refresh
Features:
Start Vector: MI 800 - Right Part of Description 1 of 1
Vector Length: 20
String Pattern: Text_To_Display

Var Type: ASCII String


Var Name: Variable 10
Linked Operand: MB 6 - Refresh
Features:
Start Vector: MI 0 - ASCII String Input 1 of1
Vector Length: 31
String Pattern: Text_To_Display

R:\BABU_GT2\BarCodeSCN_V350.vlp Page 7 of 13 16 December 2023


HMI Display: Set

Jump Condition Display


SB 51 - Left Arrow ! Start-Up Display

Vars Table
Var Alias Var Name Var Type
A Variable 11 ASCII String

Var Type: ASCII String


Var Name: Variable 11
Linked Operand: MB 6 - Refresh
Features:
Start Vector: MI 0 - ASCII String Input 1 of1
Vector Length: 31
String Pattern: Text_To_Display

Defined Fonts

Font Name Size Bold Underline StrikeOut Script Code


MS Sans Serif 8 0
Calibri 8 0
Calibri 6 0
Calibri 4 0

HMI Information

SI 252 Module Name Display Name


0 ! Start-Up Module ! Start-Up Display
1 ! Start-Up Module Set

R:\BABU_GT2\BarCodeSCN_V350.vlp Page 8 of 13 16 December 2023


Hardware Configuration

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

High Speed Inputs (Reload):


I 0,1: None
I 0,1: None
I 2,3: None
I 2,3: None

High Speed Outputs (PWM):


O 0: None
O 1: None

R:\BABU_GT2\BarCodeSCN_V350.vlp Page 9 of 13 16 December 2023


Inputs
Address PowerUp Description
0
1
2
3
4
5
6
7
8
9
10
11

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

R:\BABU_GT2\BarCodeSCN_V350.vlp Page 10 of 13 16 December 2023


Address PowerUp Format Description
0 DEC ASCII String Input 1 of1
1 DEC ASCII String Input 1 of2
2 DEC ASCII String Input 1 of3
3 DEC ASCII String Input 1 of4
4 DEC ASCII String Input 1 of5
5 DEC ASCII String Input 1 of6
6 DEC ASCII String Input 1 of7
7 DEC ASCII String Input 1 of8
8 DEC ASCII String Input 1 of9
9 DEC ASCII String Input 1 of10
10 DEC ASCII String Input 1 of11
11 DEC ASCII String Input 1 of12
12 DEC ASCII String Input 1 of13
13 DEC ASCII String Input 1 of14
14 DEC ASCII String Input 1 of15
15 DEC ASCII String Input 1 of16
16 DEC ASCII String Input 1 of17
17 DEC ASCII String Input 1 of18
18 DEC ASCII String Input 1 of19
19 DEC ASCII String Input 1 of20
20 DEC ASCII String Input 1 of21
21 DEC ASCII String Input 1 of22
22 DEC ASCII String Input 1 of23
23 DEC ASCII String Input 1 of24
24 DEC ASCII String Input 1 of25
25 DEC ASCII String Input 1 of26
26 DEC ASCII String Input 1 of27
27 DEC ASCII String Input 1 of28
28 DEC ASCII String Input 1 of29
29 DEC ASCII String Input 1 of30
30 DEC Status
31 DEC Number of Bytes received
32 DEC Index of Received Message
35 0 DEC Counter
50 DEC Status
60 DEC Number of Bytes received
61 DEC Index of Received Message
200 DEC ASCII @ Character
201 DEC ASCII @ location
202 DEC String Length
203 DEC Right String Length
204 DEC ASCII > Character
205 DEC ASCII > Location
206 DEC Description Length
207 DEC Description Right
210 DEC Test 1/3
211 DEC Test 1/3
212 DEC Test 1/3
300 HEX Left Part of String 1 of 1
301 HEX Left Part of String 1 of 2
302 HEX Left Part of String 1 of 3
303 HEX Left Part of String 1 of 4
304 HEX Left Part of String 1 of 5

R:\BABU_GT2\BarCodeSCN_V350.vlp Page 11 of 13 16 December 2023


305 HEX Left Part of String 1 of 6
400 DEC Right Part of String 1 of 1
401 DEC Right Part of String 1 of 2
402 DEC Right Part of String 1 of 3
403 DEC Right Part of String 1 of 4
404 DEC Right Part of String 1 of 5
405 DEC Right Part of String 1 of 6
406 DEC Right Part of String 1 of 7
407 DEC Right Part of String 1 of 8
408 DEC Right Part of String 1 of 9
409 DEC Right Part of String 1 of 10
410 DEC Right Part of String 1 of 11
411 DEC Right Part of String 1 of 12
412 DEC Right Part of String 1 of 13
413 DEC Right Part of String 1 of 14
414 DEC Right Part of String 1 of 15
415 DEC Right Part of String 1 of 16
416 DEC Right Part of String 1 of 17
417 DEC Right Part of String 1 of 18
418 DEC Right Part of String 1 of 19
419 DEC Right Part of String 1 of 20
420 DEC Right Part of String 1 of 21
421 DEC Right Part of String 1 of 22
422 DEC Right Part of String 1 of 23
423 DEC Right Part of String 1 of 24
424 DEC Right Part of String 1 of 25
425 DEC Right Part of String 1 of 26
426 DEC Right Part of String 1 of 27
427 DEC Right Part of String 1 of 28
428 DEC Right Part of String 1 of 29
600 DEC String Left: C (String address destination)
700 HEX Left Part of Description 1 of 1
701 HEX Left Part of Description 1 of 2
702 HEX Left Part of Description 1 of 3
703 HEX Left Part of Description 1 of 4
704 HEX Left Part of Description 1 of 5
705 HEX Left Part of Description 1 of 6
706 DEC Left Part of Description 1 of 7
707 HEX Left Part of Description 1 of 8
708 HEX Left Part of Description 1 of 9
709 HEX Left Part of Description 1 of 10
710 HEX Left Part of Description 1 of 11
711 HEX Left Part of Description 1 of 12
712 HEX Left Part of Description 1 of 13
713 HEX Left Part of Description 1 of 14
714 HEX Left Part of Description 1 of 15
715 HEX Left Part of Description 1 of 16
716 HEX Left Part of Description 1 of 17
717 HEX Left Part of Description 1 of 18
718 HEX Left Part of Description 1 of 19
719 HEX Left Part of Description 1 of 20
720 HEX Left Part of Description 1 of 21
721 HEX Left Part of Description 1 of 22
722 HEX Left Part of Description 1 of 23

R:\BABU_GT2\BarCodeSCN_V350.vlp Page 12 of 13 16 December 2023


723 HEX Left Part of Description 1 of 24
724 HEX Left Part of Description 1 of 25
725 HEX Left Part of Description 1 of 26
726 HEX Left Part of Description 1 of 27
727 HEX Left Part of Description 1 of 28
728 HEX Left Part of Description 1 of 29
729 HEX Left Part of Description 1 of 30
800 HEX Right Part of Description 1 of 1
801 HEX Right Part of Description 1 of 2
802 HEX Right Part of Description 1 of 3
803 HEX Right Part of Description 1 of 4
804 HEX Right Part of Description 1 of 5
805 HEX Right Part of Description 1 of 6
806 HEX Right Part of Description 1 of 7
807 HEX Right Part of Description 1 of 8
808 HEX Right Part of Description 1 of 9
809 HEX Right Part of Description 1 of 10
810 HEX Right Part of Description 1 of 11
811 HEX Right Part of Description 1 of 12
812 HEX Right Part of Description 1 of 13
813 HEX Right Part of Description 1 of 14
814 HEX Right Part of Description 1 of 15
815 HEX Right Part of Description 1 of 16
816 HEX Right Part of Description 1 of 17
817 HEX Right Part of Description 1 of 18
818 DEC Right Part of Description 1 of 19
819 HEX Right Part of Description 1 of 20
820 HEX Right Part of Description 1 of 21
821 HEX Right Part of Description 1 of 22
822 HEX Right Part of Description 1 of 23
823 HEX Right Part of Description 1 of 24
824 HEX Right Part of Description 1 of 25
825 HEX Right Part of Description 1 of 26
826 HEX Right Part of Description 1 of 27
827 HEX Right Part of Description 1 of 28
828 HEX Right Part of Description 1 of 29
829 HEX Right Part of Description 1 of 30

R:\BABU_GT2\BarCodeSCN_V350.vlp Page 13 of 13 16 December 2023

You might also like