1 Overall
I/O Port of CIE-H10 can be monitored and controlled by Modbus/TCP, HTTP and Macro function. Especially, HTTP is the most easily way for user using WEB browser like internet explorer. In this reason, user can make own web page with HTML on the version of firmware is 1.3A and boot is 1.6. To use this, boot and firmware upgrade are needed. We offer the special firmware which allows user to download its boot file, because that work is hard and complicate for user. This document describes in detail the processes and way to use HTTP script function. By using this document, make your own web page to monitor and control the CIE-H10’s I/O Ports.
For using the new added function, CIE-H10 has to download a new boot (ver. 1.6A) and a firmware (ver. 1.3C). This work is so complicate and you might be a little confused. Referring to below diagram in step by step work, it’s not a big deal for anyone.
Fig. 3‑1 Diagram for upgrade boot and firmware
To upgrade the boot, the special firmware has to be downloaded at first. The special firmware is named as Burn boot firmware. This is for only upgrade the CIE-H10’s boot to 1.6A. To do this, enter the ISP mode with ISP switch. Pushing the ISP button over a second, CIE-H10 may enter the ISP mode. Then, run the hotflash which program is for download firmware of ezTCP through the LAN. Refer to figure 3-2. Input correct IP address and select the Burn boot firmware.
Fig 3‑2 Running the hotflash (left) and select the Burn boot file with [FILE] button (right)
If download is completed, you can show below window. (Fig.3-3)
Fig 3‑3 Success message
After the firmware is downloaded, exception of PWR and LINK LED, all LEDs may be off.
When the Burn boot file is downloaded, to move to newly installed boot, just press the ISP switch one time. The status may not been changed. However, if the LINK LED is turn on again, the CIE-H10 has been moved on the new boot.
Download the new firmware as above 3.1.1 Download the Burn boot.
Fig. 3‑4 Selecting the new firmware (left) and complete message (right)
If the file transfer is complete, a message box will appear on your screen. After then, CIE-H10 turn into the normal mode, the STS LED will be blinks
Run ezManager and press the [Search all] button, then the CIE-H10’s MAC address is listed on the result box. Select the product and press [Initialization] button to reset the CIE-H10 to its default status.
Fig. 3‑5 Running ezManager
Now, to download the user’s HTML file, press the [Firmware / HTML] button.
Fig. 3‑6 A window of firmware / HTML change
When selecting the HTML file, user can use both the [open firmware / HTML] and drag & drop on Windows explorer. By pressing [Send] button, the transmission is progress. If the sending is complete, you can connect to CIE-H10 through your own web page like fig. 3-7.
Fig. 3‑7 Connecting CIE-H10 through HTTP
To control I/O port with user’s web page, you should know the way of using script functions. All the script started with “<?”, ended with “?>” and functions have to be separated with “;” (semicolon). 4.1.1 io_echo(var) and 4.1.2 io_echo(var1, var2, “string1”, “string2”) are used in this example, rest of them will be use in the future with ADC(Analog to Digital Convertor).
This means print a value of “var”. Example of using this function is following.
In above example, “$ci0” means the comment of first input port. The command link is presented as printing the comment of first input port. In case of configuring the first input port to “inout_1”, it displayed like the figure 4-1(right side) on user’s web page.
Fig. 4‑1 Comment of di0(left) on ezManager and the result on web page(right)
This function means that if the values of “Var1” and “Var2” are same, print the “Sting1”, or else print the “string2.” An example of usage is followed.
|
<? io_echo_equ($i0, 0, "<img src=h10_y_off.gif border=0>", "<img src=h10_y_on.gif border=0>"); ?> |
“$i0” presents the first input port “di0” which is named at “Input_1.” This example carries out that if the value of Input_1 is 0, shows the image file which name is “h10_y_off.gif”, or else shows the image file which name is “h10_y_on.gif”. In figure 4-2, the first one is the status that LED of Input_1 is off and second one is on.
Fig 4‑2 Result of Input_1 on web site (left) and uploading HTML files (right)
Linked image files have to be included on the list of transferred HTTP files. Look at the right image of figure 4-2. When you down load HTTP files to CIE-H10, you should check all the files that linked with your HTTP file because those files are used only.
This function means that if value of “var1” is larger than “var2”, prints “string1”, or else shows “string2”
This function means that if values of “var1” and “var2” are same or the value of “var1” is larger than “var2”, prints “string1”, or else shows “string2”
This function means that if value of “var1” is smaller than “var2”, prints “string1”, or else shows “string2”
This function means that if values of “var1” and “var2” are same or the value of “var1” is smaller than “var2”, prints “string1”, or else shows “string2”
Table 1. A list of variables
|
Division |
Name |
Description |
|
Input |
$i0 ~ $i7 |
Input ports # 0 ~ 7 |
|
$ci0 ~ $ci7 |
Comments of input ports # 0 ~ 7 |
|
Output |
$o0 ~ $o7 |
Output ports # 0 ~ 7 |
|
$co0 ~ $co7 |
Comments of output ports # 0 ~ 7 |
|
ADC |
$a0 |
An Analog port # 0(In the future) |
|
No |
HTML File |
|
0. |
… omitted … |
|
1. |
<table background="cie_h10.gif" border=0 cellpadding=0 cellspacing=0 width=494 height=630> |
|
2. |
<tr valign=top> |
|
3. |
<td align=left colspan=5 height=370></td> |
|
4. |
</tr> |
|
5. |
<tr height=16> |
|
6. |
<td width=88></td> |
|
7. |
<td width=120 class="B" align=right><? io_echo($ci0); ?></td> |
|
8. |
<td width=13><? io_echo_equ($i0, 0, "<img src=h10_y_off.gif border=0>", "<img src=h10_y_on.gif border=0>"); ?></td> |
|
9. |
<td width=24></td> |
|
10. |
<td width=13><? io_echo_equ($o0, 0, "<a href=index.html?o0=1><img src=h10_g_off.gif border=0></a>", "<a href=index.html?o0=0><img src=h10_g_on.gif border=0></a>"); ?></td> |
|
11. |
<td width=140 class="B" align=left><? io_echo($co0); ?></td> |
|
12. |
<td width=96></td> |
|
13. |
</tr> |
|
14. |
<tr height=6> |
|
15. |
<td colspan=5></td> |
|
16. |
</tr> |
|
17. |
<tr height=16> |
|
18. |
<td width=88></td> |
|
19. |
<td width=120 class="B" align=right><? io_echo($ci1); ?></td> |
|
20. |
<td width=13><? io_echo_equ($i1, 0, "<img src=h10_y_off.gif border=0>", "<img src=h10_y_on.gif border=0>"); ?></td> |
|
21. |
<td width=24></td> |
|
22. |
<td width=13><? io_echo_equ($o1, 0, "<a href=index.html?o1=1><img src=h10_g_off.gif border=0></a>", "<a href=index.html?o1=0><img src=h10_g_on.gif border=0></a>"); ?></td> |
|
23. |
<td width=140 class="B" align=left><? io_echo($co1); ?></td> |
|
24. |
<td width=96></td> |
|
25. |
</tr> |
|
26. |
… omitted … |
The table is defined at the first line and the image file named “cie_h10.gif” is used as background of it. Each row is divided seven parts (No.6 ~ 12) and the comment is shown at the field No.7. As presented in Syntax of script function, if the value of first input port is zero, image file that the LED is off is printed, or the other image file that LED is on is printed. Look at the line number 10. If user clicks the image that the LED is off, it is changed with the image that the LED is on and vice versa.
Fig. 4‑3 Clicking the image No.1, 3, 7 in sequence
Table 2. A list of used files in the example
|
Name |
Type of file |
Descript |
|
cie_h10.gif |
Image |
An image of CIE-H10’s body |
|
h10_g_off.gif |
Image |
An image that the green LED is off |
|
h10_g_on.gif |
Image |
An image that the green LED is on |
|
h10_y_off.gif |
Image |
An image that the yellow LED is off |
|
h10_y_on_gif |
Image |
An image that the yellow LED is on |
|
index.html |
HTML |
Main of web page |
Download the Examples Files of HTML 
(
0)

(
0)
Posted by Roy