Corporation Switch User Manual
Table Of Contents
- Ethernet Networking
- Command Descriptions
- NTCONNNetwork Connect
- NTIDNetwork Sharing Unit ID for Peer-to-Peer Communication
- NTIONetwork I/O (OPTO22) Configuration
- NTIPNetwork IP Address
- NTMPRBNetwork Map Binary Variables for Reading from PLC
- NTMPWBNetwork Map Binary Variables for Writing to PLC
- NTMPRINetwork Map Integer Variables for Reading from PLC
- NTMPWINetwork Map Integer Variables for Writing to PLC
- NTPOLLNetwork Polling Rate
- NTRATENetwork Sharing Rate for Peer-to-Peer Communication
- [ NTS ]Network Status
- NTSELPNetwork Program Select Enable
- NTWRITNetwork Write ASCII String to DVT Camera
- TNTSTransfer Network Status
- TNTSFTransfer Network Status (full-text report)
- VARSHIShared Input Variable for Peer-to-Peer Data Exchange
- VARSHOShared Output Variable for Peer-to-Peer Data Exchange
- [ \ANI ]Network Analog Input Voltage Status
- \ANONetwork Analog Output
- [ \ANO ]Network Analog Output Status
- [ \IN ]Network Digital Input Status
- \OUTNetwork Digital Output
- [ \OUT ]Network Digital Output Status
- \TANITransfer Network Analog Input Status
- \TANOTransfer Network Analog Output Status
- \TINTransfer Network Digital Input Status
- \TIOTransfer Ethernet I/O status
- \TOUTTransfer Network Digital Output Status
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
;*************************************************************************
;**** 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
VAR2=8PCEA-3VARSHI2 ; Calculate offset position: Subtract synch unit #3's
; VARSHO2 (4PCEA) from the captured encoder position
; of axis #8 (8PCEA).
IF(VAR2>10000) ; If position offset by more than 10000 encoder counts
WRITE"AXIS 20 OUT OF POSITION"
NIF
VARB1=3VARSHI1 ; Get unit 3's VARSHO1 information (3AS)
IF(VARB1=B1) ; If axis 3 on unit #3 (axis #19) is in motion
WRITE"AXIS 19 IN MOTION"
NIF
;*************************************************************************
page 33