1 reg parameter – ocs register write reference, 2 fmt parameter – ocs register write format, Reg parameter – ocs register write reference – Horner APG XL4 OCS HE-ETN300 User Manual
Page 76: Fmt parameter – ocs register write format

CH.11
SUP0740-07
11/30/2009
Page 76 of 98
# 958
<form action="writereg.htm;reg–R11;fmt–UINT" method="post">
<input type="text" name="reg" value="0">
<input type="submit" value="Send">
</form>
In the following example, the first <input> tag creates an ON button that can be clicked to turn
%T22 On, while the second <input> tag creates an OFF button that can be clicked to turn %T22
Off.
<form action="writereg.htm;reg-T22;fmt-BOOL-ON-OFF" method="post">
<input type="submit" name=”reg” value="ON">
<input type="submit" name=”reg” value="OFF">
</form>
Important: In the above two examples, the OCS HTTP Server expects the name=”reg”
attributes to appear exactly as shown.
The <form> tag’s required action attribute is a quoted string containing the writereg.htm
reference and two parameters, all separated by semicolons. The reg and fmt parameters specify
the OCS Register to write and the data entry/select format to use. These parameters are
described in more detail in the following 2 sections:
11.5.3.1
REG PARAMETER – OCS REGISTER WRITE REFERENCE
Examples: reg–R11
reg–R11.3
The required reg parameter is followed by a dash and an OCS Register reference. Register
references start at 1 and the maximum reference depends on the register type and Ethernet
Module type, as show in the following table:
Table 11.2 – OCS Register Write References
OCS Register Type
Maximum Reference
(ETN200)
Maximum Reference
(ETN300)
¾ %R
R2048
R9999
¾
%AI, %AQ
AI512, AQ512
AI512, AQ512
%I, %Q, %M, %T
I2048, Q2048, M2048, T2048
I2048, Q2048, M2048, T2048
¾ For BOOL formatting (see next section), a bit number can be appended to 16-bit register
references (%R, %AI and %AQ). For example, reg-R11.3 references bit 3 of register %R11.
Valid bit numbers are 1 through 16.
11.5.3.2
FMT PARAMETER – OCS REGISTER WRITE FORMAT
Examples:
fmt–BOOL
fmt–BOOL–ON–OFF
fmt–BOOL–YES–NO
fmt–BIN
fmt–HEX
fmt–INT
fmt–UINT
fmt–DINT
fmt–UDINT
fmt–REAL
fmt–ASCII–10