Description
An Enable Disable HTTP or FTP/TFTP Services
operation
changes the enabled state of the module’s HTTP or FTP/TFTP
services.
Network Implementation
An Enable Disable HTTP or FTP/TFTP Services
operation
can be performed on TCP/IP Ethernet networks.
Implementing the DATA_EXCH Block
A DATA_EXCH
block can be
used to change the state of the FTP/TFTP service or the HTTP service
while the application is running. The DATA_EXCH
block cannot change the state of the HTTP or FTP/TFTP services if
the service was disabled using one of the configuration tools.
DATA_EXCH
function to manage security on M340
and M580.Configuring the Address Variable
The Address variable identifies the local address of the module for which FTP/TFTP and HTTP will be enabled or disabled
Variable |
Type |
Description |
---|---|---|
Address |
ARRAY [0..5] of INT for Premium ARRAY [0..7] of INT for M340 |
Address of the destination entity of the exchange. If the Action parameter is send/receive type, broadcast addresses are prohibited. For Premium:
For M340:
NOTE: In each example, the address is:
|
Configuring the Action Variable
The Action variable identifies the function type for the DATA_EXCH function block:
Variable |
Type |
Description |
Value (hex) |
---|---|---|---|
Action |
INT |
1 = Transaction followed by await reception |
16#0001 |
Configuring the Data_to_Send Variable
The Data_to_Send variable is an ARRAY [0..3] of INT and includes the following:
Variable |
Description |
Value (hex) |
|
---|---|---|---|
Data_to_Send[0] |
|
16#005A |
|
Data_to_Send[1] |
|
16#016E |
|
Data_to_Send[2] |
The values of the Ethernet service command can be:
|
16#00xx on M340/M580 16#xx00 on Premium |
|
Data_to_Send[3] |
|
16#0000 |
Configuring the Management_Param Variable
The Management_Param variable is an ARRAY [0..3] of INT and includes the following:
Variable |
Description |
Value (hex) |
|
---|---|---|---|
Management_Param[0] |
|
- |
|
Management_Param[1] |
|
- |
|
Management_Param[2] |
The time out value can be set to any value. Because the time-out base is 100 ms, in this example the time-out is set to 10 seconds. |
16#0064 |
|
Management_Param[3] |
NOTE: The Length needs to be set to a value of 8
bytes.
|
16#0008 |
Viewing the Response
Use a Control Expert Animation Table to display the response. The response is contained in the Received_Data variable, which is an ARRAY [0..3] of INT:
Variable |
Value (hex) |
|
---|---|---|
Example of a successful response: |
||
Received_Data[0] |
16#005A (M340 Modbus) 16#008A (Premium UNITE) |
|
Received_Data[1] |
16#xxFE (Success) |
|
Received_Data[2] |
16#00yy NOTE: The
word created with the 16#yyxx has got the same meaning as ETH_SCE_STATUS output of ETH_PORT_CTRL EFB.
|
|
Received_Data[3] |
16#0000 |
|
Example of an unsuccessful response: |
||
Received_Data[0] |
16#005A (M340 Modbus) 16#008A (Premium UNITE) |
|
Received_Data[1] |
16#xxFD (Detected error)1 |
|
Received_Data[2] |
16#00xx1 |
|
Received_Data[3] |
16#0000 |
|
1. The detected error code appears in the format FD xx xx, where xx xx can be the following:
NOTE: In case of multiple detected errors, the order
of priority in the display is Disabled, Invalid Data, Same State,
Busy.
|