Instructions

Server Side Include (SSI) 52
Doc: HMSI-27-314, Rev. 3.10Anybus Communicator EtherNet/IP / Modbus-TCP User Manual
scanf
Note: This function cannot be used in e-mail messages.
This SSI function reads a string passed from an object in a HTML form, interprets the string according
to the specified in-format, and stores the result in the OUT area according to the passed arguments. 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 - The name of the object with the passed data string
format - Specifies how the passed string shall be formatted
Arg1 - ArgN - Specifies where to write the data
ErrVal1 -ErrValN - Optional; specifies the value/string to write in case of an error.
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’
CipReadUWord(class, inst, attr) Read an unsigned word from a CIP-object
CipReadSLong(class, inst, attr) Read a signed longword from a CIP-object
CipReadULong(class, inst, attr) Read an unsigned longword from a CIP-object
CipReadFloat(class, inst, attr) Read a floating point value from a CIP-object
CipReadShortString(class, inst, attr) Read a short string from a CIP-object
CipReadString(class, inst, attr) Read a null-terminated string from a CIP-object
CipReadUByteArray(class, inst, attr) Read an unsigned byte-array from a CIP-object
CipReadUWordArray(class, inst, attr) Read an unsigned word-array from a CIP-object
CipReadULongArray(class, inst, attr) Read an unsigned longword-array from a CIP-object
Character Input, Argument Type
d Decimal number; byte, short
i Number, byte, short. The number may be in octal (leading 0(zero)) or hexadecimal (leading 0x
or 0X)
o Octal number (with or without leading zero); byte, short
u Unsinged decimal number; unsigned byte, unsigned short
x Hexadecimal number (with or without leading 0x or 0X); byte, short
c 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.
s Character string (not quoted); char*, pointing to an array of characters large enough for the
string and a terminating "\0" that will be added.
e, f, g Floating-point number with optional sign, optional decimal point and optional exponent; float*
% Literal %; no assignment is made.
Argument Description