Parker Hannifin GEM6K Varshi, Shared Input Variable for Peer-to-Peer Data Exchange, Default n/a

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

*

NO

NO

NO

NO

NO

NO

*Reserved

*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:

<!><n>VARSHI<i>

6K

5.3

 

(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

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:

<assignment> = <n> VARSHI <i>

Assignment options:

<variable>n

Variable number

VAR (numeric variable)

VARI (integer variable)

VARB (binary variable)

n IN (virtual input assignment) I/O brick number.

Range: 1-8

Must be an unused I/O brick

Number of the VARSHO variable from unit <n>

Number of the source unit (use this unit’s VARSHO data)

The Implementation Process, beginning on page 8, 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

rate to 100ms and enable this unit

NTRATE100

; Set the sharing

VARSHO2=4PCEA

; Store the captured encoder position of axis #4 in shared

VARSHO1=3AS

; output variable

#2

; Store axis #3's

axis status (binary data) in shared

;output variable #1

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

page 31

Image 35
Contents Ethernet Networking for 6K and Gem6K User Information Ethernet Networking Page Example Direct Connect to One Server Setup Wizard AvailableOverview Example Direct Connect to PC Device Networking GuidelinesPing Changing the 6K’s IP Address or Subnet Mask Configuring the 6K for Ethernet CommunicationSetting TCP/IP Properties and Static Mapping Preparing the Controller over RS-232Page Arp -s 192.168.10.30 0-90-55-0-0-1 Connecting the 6K to the PC through EthernetMilliseconds Networking with Other 6K or Gem6K Products Peer-to-PeerSet see ER, TER, Terf Communication according to the procedures onThen the command would be 3NTIP2,172,20,34,170 Networking with OPTO22 Snap I/ONetwork Server # Ntio command to specify the type of module in that positionInputs Module # on Server n Range Networking with a DVT Vision SystemIs set see ER, TER, Terf Provided below Command would be 3NTIP1,172,20,34,124Networking with an Allen-Bradley SLC 5/05 PLC OPTO22 Ethernet I/O rack5NTPOLL50 NTFEN2 Reset5NTCONN1 VARB100-VARB103PLC Exchanging data automatically with the PLC. Here is how toHAB79 VARB106Error Response Possible Cause Error ConditionsError messages related to Ethernet networking Related Error Status register bits are noted below ER, TER, and Terf NtconnNetwork Connect Product Type Syntax Units Range Default Response See AlsoNtid Network Sharing Unit ID for Peer-to-Peer CommunicationNtio Network I/O OPTO22 Configuration\OUT , \TANI, \TANO, \TIN, \TIO, \TOUT Server Type Type Syntax Units Range Default ResponseNtip Network IP AddressExample Ntmprb Network Map Binary Variables for Reading from PLCNetwork Map Binary Variables for Writing to PLC NtmpwbTNTS, TNTSF, Vari Ntmpri Network Map Integer Variables for Reading from PLCWAITVARI40=22 NtmpwiNetwork Map Integer Variables for Writing to PLC VARI35-VARI49Range n = NtpollNetwork Polling Rate NTFEN, NTID, SYSPER, VARSHO, Varshi NtrateNetwork Sharing Rate for Peer-to-Peer Communication Ntrate *NTRATE50Network Status Network Program Select EnableNTS NtselpNetwork Write Ascii String to DVT Camera Default Response See AlsoNtwrit Transfer Network Status full-text report TntsTntsf Transfer Network StatusShared Input Variable for Peer-to-Peer Data Exchange Default n/aVarshi Shared Output Variable for Peer-to-Peer Data Exchange Range i = Default n/aVarsho Output variable #1 This code is executed on unit #2 NTIO, \TANI, \TIO, VAR \ANINetwork Analog Input Voltage Status \ANO , NTIO, \TANO, \TIO \ANONetwork Analog Output Network Analog Output Status \ANONTIO, \TIN, \TIO, Varb \INNetwork Digital Input Status \OUT , NTIO, \TIO, \TOUT \OUTNetwork Digital Output VARB9=2\3OUT \OUTNetwork Digital Output Status Transfer Network Analog Input Status \TANITransfer Network Analog Output Status \TANOTransfer Network Digital Input Status Range n = Default n/a\TIN \TIOAnalog Outputs \TOUTTransfer Network Digital Output Status Digital Outputs