Varshi – Parker Hannifin GEM6K User Manual
Page 35
*Connection Open YES NO NO NO NO NO
*Server Connection Error NO NO NO NO NO NO
*In Polling Mode YES NO NO NO NO NO
*Polling Timeout Error NO NO NO NO NO NO
*
*Reserved NO NO NO NO NO NO
*Reserved NO NO NO NO NO NO
*Reserved NO NO NO NO NO NO
*Reserved NO NO NO NO NO NO
VARSHI
Shared Input Variable for Peer-to-Peer Data Exchange
Type:
Variable; Network
Product Rev
Syntax:
(see
diagram
below
for
assignment
syntax)
Units:
n = unit number in the peer-to-peer network;
i = VARSHO number from unit “n”
Range:
n = 1-8;
i = 1-8
Default:
n/a
Response:
1VARSHI1: *1VARSHI1=0.0
See Also:
IN, VAR, VARB, VARI, VARSHO
6K 5.3
The
VARSHI
command helps you use shared data over a peer-to-peer Ethernet connection with other 6K or Gem6K
products.
VARSHI
can be used to assign the integer or binary
VARSHO
data to a
VAR
(numeric),
VARI
(integer), or
VARB
(binary) variable, or to a virtual input brick (
IN
). You can also use
VARSHI
in a conditional statement, such as
IF
,
WAIT
,
WHILE
, or
UNTIL
.
The diagram below shows the syntax requirements for assigning
VARSHI
data to a variable:
VARSHI
Assignment options:
Variable number
Number of the source unit
(use this unit’s VARSHO
data)
Number of the VARSHO
variable from unit
VAR (numeric variable)
VARI (integer variable)
VARB (binary variable)
I/O brick number.
• Range: 1-8
• Must be an unused I/O brick
n
IN (virtual input assignment)
The Implementation Process, beginning on page
, identifies how to use the
VARSHI
command in
context with the process of setting up the peer-to-peer Ethernet data sharing.
Example: This example uses peer-to-peer communication with three 6K8 products.
;**** This code is executed on Peer unit #1: **************************
NTID1
; This unit is the "primary unit" (unit #1)
NTRATE100
; Set the sharing rate to 100ms and enable this unit
VARSHO1=1PE
; Store axis #1 encoder position in shared output variable #1
;*************************************************************************
;**** This code is executed on unit #3: **************************
NTID3
; Set unit ID to 3
NTRATE100
; Set the sharing rate to 100ms and enable this unit
VARSHO2=4PCEA
; Store the captured encoder position of axis #4 in shared
; output variable #2
VARSHO1=3AS
; Store axis #3's axis status (binary data) in shared
; output variable #1
;*************************************************************************
page 31