![YOKOGAWA F3RS22-0N Скачать руководство пользователя страница 47](http://html1.mh-extra.com/html/yokogawa/f3rs22-0n/f3rs22-0n_user-manual_3494923047.webp)
4-16
IM 34M6H21-01E
2nd Edition : Aug, 2001-00
Handling Null Codes
In the YM-BASIC language specifications, the BASIC interpreter treats a null code ($00)
as a character string delimiter. If there is a null code embedded in a character string, the
null code and all subsequent characters are ignored. This is also the case during binary
transmission.
For sending and receiving with null codes, integer arrays can be used as input/output
variables. However, note that access will be on a word boundary (2-bytes unit) in this
case.
A$="X"+CHR($00)+"Y"
is the same as
A$="X"+"Y"
To send null codes, use the following methods.
(1) Using an integer array 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)
Note that, in the above example, when a character string with an odd number of
characters is sent, a null character is appended to the end so that there is an even
number of characters in the string.
(2) Specifying data in bytes
Send data in bytes using image setting as shown below.
OUTPUT slot,port USING "#,B";K(*)
This method sends all data in array K(*) defined in the Dimension (DIM) statement.
To send variable size data, use a program as shown below.
200 II=5
210 FOR I=1 To II
220 OUTPUT slot,port USING "#,B";K(I)
230 NEXT I
This method sends only the required characters, taking into consideration the
character-to-character timeout.
Содержание F3RS22-0N
Страница 11: ...Blank Page...
Страница 15: ...Blank Page...
Страница 28: ...3 3 IM 34M6H21 01E 2nd Edition Aug 2001 00 External Dimensions Unit mm 83 2 28 9 2 12 1 100...
Страница 31: ...Blank Page...
Страница 59: ...Blank Page...
Страница 63: ...Appx 3 2 IM 34M6H21 01E 2nd Edition Aug 2001 00 Blank Page...
Страница 65: ...Blank Page...