Parker Hannifin GEM6K manual Varsho, Shared Output Variable for Peer-to-Peer Data Exchange

Models: GEM6K 6K

1 47
Download 47 pages 8.21 Kb
Page 36
Image 36
VARSHO

;**** This code is executed on unit #2: **************************

NTID2

; Set unit ID to 2

NTRATE100

; Set the sharing rate to 100ms and enable this unit

VAR1=1VARSHI1

; Load the value of unit #1's first shared data (1PE) into VAR1

WRITE"AXIS 1 AT POSITION" ; Report axis 1's current position (the value of VAR1)

WRVAR1

; Calculate offset position: Subtract synch unit #3's

VAR2=8PCEA-3VARSHI2

 

; VARSHO2 (4PCEA) from the captured encoder position

IF(VAR2>10000)

; of axis #8 (8PCEA).

; If position offset by more than 10000 encoder counts

WRITE"AXIS 20 OUT OF POSITION"

NIF

; Get unit 3's VARSHO1 information (3AS)

VARB1=3VARSHI1

IF(VARB1=B1)

; If axis 3 on unit #3 (axis #19) is in motion

WRITE"AXIS 19 IN MOTION"

 

NIF

 

;*************************************************************************

VARSHO

Shared Output Variable for Peer-to-Peer Data Exchange

 

 

Type:

Variable; Network

Product

Rev

Syntax:

<!>VARSHO<i><=xx>

6K

5.3

Units:

i = variable number

 

 

xx= 32-bit data operand (see list below)

Range: i = 1-8

Default: n/a

Response: VARSHO1: *VARSHO1=PME

See Also: NTRATE, VAR, VARB, VARI, VARSHI

The VARSHO command is used to set up data to be shared over a peer-to-peer Ethernet connection (i.e., connection between other 6K or Gem6K products).

Each unit on the Ethernet peer-to-peer network has eight “shared output” variables (VARSHO1 through VARSHO8) with which it can share with other units the values of its motion attributes, controller status, variables, etc. (see list below). The type of data can be either binary, as in the AS (axis status) operand, or a 32-bit unscaled integer, as in PE (encoder position) operand. The data stored in the VARSHO is not scaled.

For example, unit #2 could execute VARSHO1=3PE to share the encoder position of axis #3 in shared output variable #1.

Each unit will re-broadcast its updated VARSHO data at a rate set with the NTRATE command. RECOMMENDATION: Set all devices to broadcast at the same NTRATE rate of 50 milliseconds.

The Implementation Process, beginning on page 8, identifies how to use the VARSHO command in context with the process of setting up the peer-to-peer Ethernet data sharing.

Options for shared data in the VARSHO variable:

A

Acceleration

NMCY ...

Master cycle number

SS

System status

AD

Deceleration

OUT

Output status

SWAP

Task swap assignment

ANI

Analog input voltage

PANI ...

Analog input position

TASK

Task number

ANO

Analog output voltage

PC

Commanded position

TIM

Timer value

AS

Axis status

PCC

Captured command pos.

TRIG

Trigger interrupt status

ASX

Extended axis status

PCE

Captured encoder pos.

US

User-defined status

D

Distance

PCME ...

Captured master enc. pos.

V

Velocity

DAC

DAC output value

PE

Encoder position

VARI

Integer variable

DKEY ...

RP240 keypad value

PER

Position error

VARB

Binary variable

ER

Error status

PMAS ...

Position of Master

VEL

Commanded velocity

FB

Feedback device pos.

PME

Master encoder pos.

VELA

Actual velocity

FS

Following status

PSHF ...

Net position shift

VMAS

Velocity of the master

IN

Input status

PSLV ...

Follower pos. command

VARSHI.Shared input variable

INO

Enable input status

SC

Controller status

 

 

LIM

Limit input status

SCAN ...

PLC scan time

 

 

MOV

Axis moving status

SEG

Free segment buffers

 

 

page 32

Page 36
Image 36
Parker Hannifin GEM6K manual Varsho, Shared Output Variable for Peer-to-Peer Data Exchange