Skip to main content

6.2. Using robot language

6.2. Using robot language

 

Examples of access to Fieldbus values in robot language are provided in [Table 6-2].

 

Table 62 Examples of Fieldbus access in robot language

Classification

Statement grammar

Explanation

Output

FB3.Y17=1

Turn on No. 17 output bit in FB3 channel

FB1.YB5=255

Turn on all output bits of No. 5 byte in FB1 channel

FB1.YW[5+V8%]=&HFC00

Turn on the upper 6 output bits of No (5+V8%) word in FB1 channel, and turn off the remaining output bits

FB[V4%].YL2=284000

Output 284000 as No.2 output double word in No. V4% FB channel

FB1.YF3=V5!*2.5

Output V5!*2.5 as No. 3 output real in No. FB1 channel

Input

WAIT FB3.X15

Wait for No. 15 input bit value in FB3 channel to be ON

IF FB3.XB2=9 THEN 99

Branch to row No. 99 if No. 2 input byte value in FB3 channel is 9

V20%=FB1.XW3

Substitute No. 3 input word value in FB1 channel for V20%

WAIT FB1.XL5>12000

Wait for No. 5 input double word value in FB1 channel to be larger than 12000

V7!=V25!*FB3.XF3/2.0

Substitute the value obtained by multiplying No. 3 input real value in FB3 channel with V25! and divide the result by 2 for V7!