YOKOGAWA F3RS22-0N Скачать руководство пользователя страница 41

              

4-10

 

IM 34M6H21-01E

2nd Edition : Aug, 2001-00

 

 

- Input 

Procedure 

 

Although interrupt branching using ON INT can be used in almost all situations, 
TRANSFER is useful when you need to perform input time monitoring (SET 
TIMEOUT/ON TIMEOUT) processing.  Normally, interrupt input using ON INT is 
used. 

 

Data is output into the input/output buffer first and then read using ENTER.  
Common variables cannot be used in the input/output buffer. 

10 DEFINT I 

20 DIM BUFF$ 256,A$256 

30 ASSIGN RS22=5 

40 ON EOT 5,2 GOSUB RSEOT@  

 … 

Specify interrupt destination 

50 TRANSFER 5,2 INTO BUFF$ 

… Initiate 

TRANSFER 

       

  Other 

processing 

       

1000 

 RSEOT@ STATUS 5,2,4;IST 

1010 

 IF IST<>0 THEN 

1020 

    PRINT “TRANSFER ERROR!” 

1030 

 ELSE  

  

Interrupt processing for end of 

TRANSFER 

1040 

    ENTER BUFF$;A$ 

1050    PRINT A$ 

1060 

 ENDIF 

1070 RETURN 

z

 Format Specification

 

When specifying the format such as the addition of terminator in a TRANSFER 
statement, match it with the format specification of the ENTER/OUTPUT statement used 
for buffer input/output. 

For details on the operation of each individual format type, see Section 4.2. 

Table 4.6    Format Specification on Output 

Type 

Format Specification of OUTPUT 

Format Specification of 

TRANSFER 

Terminator 

Code 

Conversion 

I OUTPUT 

BUFF$ 

OUTPUT BUFF$ USING “~“; ~ 

TRANSFER S, P FORMAT FROM 
BUFF$ 

Appended 
automatically  

Yes 

II OUTPUT 

BUFF$ 

OUTPUT BUFF$ USING “#, ~“; ~ 

TRANSFER S, P FROM BUFF$ 

Not appended 
(appended by 
user) 

Yes 

III 

OUTPUT BUFF$  
NOFORMAT; ~ 

TRANSFER S, P NOFORMAT 
FROM BUFF$ 

Not appended 

No (YM. 
BASIC/FA 
internal code) 

S: slot number     P: port number     BUFF$: name of I/O buffer 

 

Table 4.6   Format Specification on Input   

Type 

Format Specification of ENTER 

Format Specification of 

TRANSFER 

Terminator 

Code 

conversion 

ENTER BUFF$; A$ 
ENTER BUFF$ USING “~“; A$ 

TRANSFER S, P INTO BUFF$ 

Appended 
automatically  

Yes 

II 

ENTER BUFF$ FORMAT; A$ 
ENTER BUFF$ USING “~“; A$ 

TRANSFER S, P FORMAT INTO 
BUFF$ 

Not appended 
(appended by 
user) 

Yes 

III 

ENTER BUFF$ NOFORMAT; A$ 

TRANSFER S, P NOFORMAT INTO 
BUFF$ 

Not appended 

No (YM. 
BASIC/FA 
internal code) 

S: slot number     P: port number     BUFF$: name of I/O buffer

 

Содержание F3RS22-0N

Страница 1: ...User s Manual IM 34M6H21 01E Serial Communication Modules IM 34M6H21 01E 2nd Edition Yokogawa Electric Corporation...

Страница 2: ...ller FA M3 Model F3RS22 0N Name RS 232 C Communication Module Model F3RS41 0N Name RS 422 Communication Module The document number and document model code for this manual are given below Refer to the...

Страница 3: ...ns come to the attention of the user please contact the nearest Yokogawa Electric representative or sales office Safety Precautions when Using Maintaining the Product The following safety symbols are...

Страница 4: ...ment for the product and control system as well as designing or installing separate protection and or safety circuits for fool proof design and fail safe design of processes and lines using the produc...

Страница 5: ...copy of the software for use with each additional computer Copying the software for any purposes other than backup is strictly prohibited Store the original media such as floppy disks that contain th...

Страница 6: ...eck them thoroughly before turning on the power Interlock with emergency stop circuitry using external relays Equipment incorporating the FA M3 must be furnished with emergency stop circuitry that use...

Страница 7: ...temperatures take special care storage temperature should be from 20qC to 75qC There is a built in lithium battery in a CPU module and temperature control module which serves as backup power supply fo...

Страница 8: ...2002 96 EC marking requirement The following marking indicates that you must not discard this electrical electronic product in domestic household waste Product Category With reference to the equipment...

Страница 9: ...ls accordingly For BASIC CPU modules F3BP20 and F3BP30 BASIC CPU Module and YM BASIC FA Programming Language IM 34M6Q22 01E Common for all sequence CPU modules For the FA M3 specifications and configu...

Страница 10: ...ine manual pay attention to possible inconsistencies with the latest version of the online manual Ensure that the edition agrees with the latest CD ROM version Copying passing selling or distribution...

Страница 11: ...Blank Page...

Страница 12: ...ting to an RS 232 C Device DTE Data Terminal Equipment 2 5 Connecting to a Modem DCE Data Communication Equipment 2 6 Notes on Wiring 2 8 2 3 Attaching and Detaching Modules 2 9 3 F3RS41 0N Communicat...

Страница 13: ...Format of Received Text 4 12 XON XOFF Control 4 14 Break Signal 4 14 4 5 Special Communications 4 15 Long Text 4 15 Binary Transmission 4 15 Handling Null Codes 4 16 Inserting Binary Data into Text 4...

Страница 14: ...an be used with F3BP20 or F3BP30 BASIC CPU modules for RS 422 A or RS 485 communication It has one port that uses a terminal block for connection and allows transmission to a maximum distance of 1200...

Страница 15: ...Blank Page...

Страница 16: ...D mm Weight 120 g Dimensions excluding protrusions See figure on External Dimensions Function Specifications Item Specifications Default Connection Point to point Communication mode Full duplex half...

Страница 17: ...trol method 1 Uncontrolled 2 Receiving line only 3 Transmitting line only 4 Both transmitting and receiving lines Uncontrolled XON character 11 DC1 XON XOFF control XOFF character One character length...

Страница 18: ...module add 90 mm to the 83 mm depth across the bottom of the module to allow for approximately 173 mm as the mounting depth to accommodate the base module the RS 232 C connector and the bending radius...

Страница 19: ...a no 3 SD Send Data no 4 ER Data Terminal Ready no 1 ER turns on when power is switched on and stays on default 2 Turns on and off by software 5 SG Signal Ground no 6 DR Data Set Ready yes Used to che...

Страница 20: ...module z Introduction to Yokogawa supplied cables The following null modem cables are available from Yokogawa Model Code Suffix Code Specifications YCB215 RS 232 C null modem cable with control line w...

Страница 21: ...is the YCB211 cable supplied by Yokogawa YCB216 PIN No Connector cover PIN No Connector cover Shield 3 2 7 8 6 5 1 4 1 2 3 7 FG SD RD SG CN1 side FA M3 CN2 side SD RD RS CS DR SG CD ER YCB215 PIN No C...

Страница 22: ...specifications and wiring diagrams of these cables are summarized below Model Name Suffix Code Specification YCB211 RS 232 C modem cable without control line with 9 and 25 pin connectors ML gateway c...

Страница 23: ...ecting the F3RS22 0N module not via a modem Ground the module in common with the remote equipment 3 For conforming equipment incorporating the F3RS22 0N to CE Marking use a shielded cable Remove the c...

Страница 24: ...ce CAUTION Always switch off the power before attaching or detaching a module Figure 2 1 Attaching Modules CAUTION DO NOT bend the connector on the rear of the module by force during the above operati...

Страница 25: ...ion environments fasten the module with a screw Use screws of type listed in the table below Insert these screws into the screw holes on top of the module and tighten them with a Phillips screwdriver...

Страница 26: ...vers 32 receivers Transmission distance 1 200 m maximum Connector Six pole terminal block with 3 5 mm screws Current consumption 210 mA 5 V DC Dimensions 28 9 W u 100 H u 83 2 D mm Weight 110 g Functi...

Страница 27: ...acter One character length any character acceptable 13 DC3 Transmission code Internal code ASCII code 1 JIS 8 bit code 2 Internal code ASCII equivalent Monitored time before I O completion Configurabl...

Страница 28: ...3 3 IM 34M6H21 01E 2nd Edition Aug 2001 00 External Dimensions Unit mm 83 2 28 9 2 12 1 100...

Страница 29: ...mited Wiring method Crimp on Crimp on terminal For 3 5 mm size Tightening torque 0 8 N m Crimp on terminal Applicable crimp on terminal Examples V1 25 M3 from J S T Mfg Co Ltd RAV1 25 3 5 from Nippon...

Страница 30: ...ire ground and secure the wire with a FG clamp CAUTION Even if the F3RS41 0N module is properly connected error such as a flashing LED may still occur because the signal polarities represented as A B...

Страница 31: ...Blank Page...

Страница 32: ...mmunication buffer Communication conditions Remarks Module Reset RESET 5 9 9 The communication conditions for the module reverts to default Port Reset RESET 5 1 9 9 The communication conditions for Po...

Страница 33: ...ster Contents Default Value 11 S C Character length 0 7 bits 1 8 bits Others 8 bits 1 12 S C Stop bit length 0 1 bit 1 1 5 bits 2 2 bits Others 2 bits 0 13 S C Parity 0 none 1 odd 2 even Others even 2...

Страница 34: ...r is stored in the input variable RCVDT string variable In the above example the receive variable RCVDT is set as follows RCVDT S1234 CHR 0D CHR 0A Although the ENTER statement can be used alone for r...

Страница 35: ...to the line If there is an image specification it follows the image specification For details on the format of the image specification refer to the IMAGE statement in the user s manual BASIC CPU Modul...

Страница 36: ...terminator attached as is If there is an image specification it follows the image specification For details on the format of the image specification refer to the IMAGE statement in the user s manual B...

Страница 37: ...ABCD B ABCD C 100 z Type III The data on the line does not undergo code conversion and is stored in the input variable unchanged The terminator even if present is not removed Example The example show...

Страница 38: ...switched to an unmasked state By executing this statement when an interrupt to BASIC occurs the received text saved in the buffer can be passed to BASIC using ENTER Since the corresponding I O interru...

Страница 39: ...oided using ON INT ENABLE INTR for the ENTER statement during input for the OUTPUT statement during output the BASIC program has to wait until the operation completes see Figure 4 1 In such a situatio...

Страница 40: ...UFF 256 A 256 30 A ABCDE 40 ASSIGN RS22 5 50 OUTPUT BUFF A Output data to buffer 60 ON EOT 5 2 GOSUB RSEOT Specify interrupt destination 70 TRANSFER 5 2FORMAT FROM BUFF Initiate TRANSFER Other process...

Страница 41: ...mat specification of the ENTER OUTPUT statement used for buffer input output For details on the operation of each individual format type see Section 4 2 Table 4 6 Format Specification on Output Type F...

Страница 42: ...ER statement 0 receiving terminated normally z0 receiving terminated abnormally 0 06 S C Transmission code 0 internal code 1 ASCII 2 JIS 8 unit 0 07 S C Character to character receiving interval timeo...

Страница 43: ...No control 1 Receiving end only 2 Transmitting end only 3 Both transmitting end and receiving end 0 26 S C XON XOFF characters 11 x 13 DC1 x DC3 101 C Send break 1 start break sending S status regist...

Страница 44: ...The character to character receiving interval timer monitors the character to character receiving time interval When the next character is not received within the specified time end of text is assume...

Страница 45: ...l switch to the XON state when power is switched on or when the module port or buffer is reset Any single character can be set as the XON XOFF character default is DC1 DC3 Example When using XON XOFF...

Страница 46: ...A language specifications a string variable has a maximum size of 512 bytes Therefore the input is performed by specifying 2 or more variables Note that if a 2 byte code Katakana Kanji etc spans a var...

Страница 47: ...as the output variable Using the NOFORMAT specification send word bounded data as given below 10 OPTION BASE 1 20 DEFINT K 30 DIM K 2 100 K 1 ASC X 110 K 2 0 120 OUTPUT slot port NOFORMAT K 1 256 K 2...

Страница 48: ...f the text This can be done conveniently using the IMAGE B W specifications Type II IMAGE B W specification is only effective in the following situation and cannot be used in other situations It has t...

Страница 49: ...arities are connected in the terminal block in this module Only 2 wires are laid externally 1 Connect the shielded cables to both ends of the ground terminals of FG or SHIELD terminals 2 For more info...

Страница 50: ...he respective communication routes In the 4 wire system set the terminating resistor at the master station and substation n in Figure 4 3 For intermediate substation 1 to substation n 1 remove the ter...

Страница 51: ...0N master station and 2 remote equipment substations F3RS41 0N polls the 2 remote equipment for any data to be sent If there is data to be sent from the remote equipment the data is read Here the com...

Страница 52: ...70 ON INT SLOT PORT GOSUB ENTSTS Declare interrupt and set branch points 80 ENABLE INTR SLOT PORT 111 Enable interrupt 90 MNUMBER 01 Device number 100 COMMAND DS DS Read Status command 110 GOSUB SND 1...

Страница 53: ...no 1110 IF RCVMNUM MNUMBER THEN GOTO RTN Do not process error device no 1120 RCVCMD MID RCVDAT 7 2 Extract command 1130 IF RCVCMD DS THEN 1140 RCVSTS MID RCVDAT 9 1 Extract status 1150 RST VAL RCVST...

Страница 54: ...e interrupt OFF INT S P Disable program branching for receive interrupt SET TIMEOUT S P Set the maximum wait time for response from interface ON TIMEOUT S P Enable program branching on timeout OFF TIM...

Страница 55: ...rate are different at the sending and receiving sides Overrun error Received data overflows the receiving buffer Internal buffer overflow Despite continual sending of data data overflows buffer at BAS...

Страница 56: ...SLOT Assign card 170 CONTROL SLOT PORT 14 7 9600bps 180 CONTROL SLOT PORT 13 2 Even parity 190 SET TIMEOUT SLOT PORT 3000 Timeout 3 seconds 200 RESET SLOT PORT 1 Reset buffer 210 220 Send Data 230 SE...

Страница 57: ...210 RESET SLOT PORT 1 Reset buffer 220 230 Receiving Complete Return Type 240 SET STATUS ERR 250 ENTER SLOT PORT FORMAT REC Receive Type II 260 IF ERR 82 THEN 270 IF ERRCE E6 THEN 280 DISP error HEX E...

Страница 58: ...NPUT SUBROUTINE 330 STATUS SLOT PORT 2 IREC Interrupt branch condition 340 IF IREC 0 THEN Normal receive 350 ENTER SLOT PORT FORMAT REC Receive type II 360 DP time TIME receive data REC 370 ELSE 380 D...

Страница 59: ...Blank Page...

Страница 60: ...t Used when sending data to the remote side 1 Always ON default 2 ON only during sending 8 CS Clear to Send Input 9 Signal from the remote side granting permission to send Cannot send if this signal i...

Страница 61: ...the user The transfer data rate data bit length and other communication parameters are set using software Figure appx 2 Start Stop Synchronous Transmission z Text Transmission data usually consists o...

Страница 62: ...0 0 0 1 1 SOH DC1 1 A Q a q 0 0 1 0 2 STX DC2 2 B R b r 0 0 1 1 3 ETX DC3 3 C S c s 0 1 0 0 4 EOT DC4 4 D T d t 0 1 0 1 5 ENQ NAK 5 E U e u 0 1 1 0 6 ACK SYN 6 F V f v 0 1 1 1 7 BEL ETB 7 G W g w 1 0...

Страница 63: ...Appx 3 2 IM 34M6H21 01E 2nd Edition Aug 2001 00 Blank Page...

Страница 64: ...Item 1st Dec 1998 New Publication 2nd Aug 2001 Addition of explanations on support of CE Mark Correction of typographical errors Written by Product Marketing Department IT Controller Center Yokogawa E...

Страница 65: ...Blank Page...

Отзывы: