HMS Anybus Communicator User Manual page 42

For profinet
Table of Contents

Advertisement

scanf
Note: This function cannot be used in e-mail messages.
This function reads a string passed from an object in a HTML form, interprets the string according to
the specification in format, and stores the result in the Output Data area according to the passed argu-
ments. The formatting of the string is equal to the standard C function call scanf()
Syntax:
<?--#exec cmd_argument="scanf( 'ObjName', 'format', Arg1, ..., ArgN), ErrVal1,
..., ErrvalN"-->
ObjName
format
Arg1 - ArgN
ErrVal1 -ErrValN
Character Input, Argument Type
d
i
o
u
x
c
s
e, f, g
%
The conversion characters d, i, o, u and x may be preceded by l (letter ell) to indicate that a pointer to
"long" appears in the argument list rather than a "byte" or a "short"
The arguments that can be passed to the SSI function scanf are:
Argument
OutWriteByte(offset)
OutWriteWord(offset)
OutWriteLong(offset)
OutWriteString(offset)
OutWriteFloat(offset)
CipWriteByte(class, inst, attr)
CipWriteWord(class, inst, attr)
CipWriteLong(class, inst, attr)
CipWriteFloat(class, inst, attr)
Default output:
Write succeeded
Write failed
Anybus Communicator PROFINET User Manual
- The name of the object with the passed data string
- Specifies how the passed string shall be formatted
- Specifies where to write the data
- Optional; specifies the value/string to write in case of an error.
Decimal number; byte, short
Number, byte, short. The number may be in octal (leading 0(zero)) or hexadecimal (leading 0x
or 0X)
Octal number (with or without leading zero); byte, short
Unsigned decimal number; unsigned byte, unsigned short
Hexadecimal number (with or without leading 0x or 0X); byte, short
Characters; char*. The next input characters (default 1) are placed at the indicated spot. The
normal skip over white space is suppressed; to read the next non-white space character, use
%1s.
Character string (not quoted); char*, pointing to an array of characters large enough for the
string and a terminating "\0" that will be added.
Floating-point number with optional sign, optional decimal point and optional exponent; float*
Literal %; no assignment is made.
Description
Write a byte to position offset in the Output Data area
Write a word to position offset in the Output Data area
Write a long to position offset in the Output Data area
Write a string to position offset in the Output Data area
Write a floating point value to position offset in the Output Data area
Write a byte value to a CIP-object
Write a word value to a CIP-object
Write a longword to a CIP-object
Write a floating point value to a CIP-object
Server Side Include (SSI) 42
Doc: HMSI-27-309, Rev. 3.11

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Anybus Communicator and is the answer not in the manual?

Questions and answers

Table of Contents