Enable / Disable HTTP or FTP/TFTP Services
Original instructions
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.
Control Block Usage for TCP/IP Ethernet
When HTTP or FTP/TFTP has been enabled using Control Expert configuration tools, an MSTR block can be used to change the enabled state of the service while the application is running. The MSTR block cannot change the state of the HTTP or FTP/TFTP services if the service was disabled using one of the configuration tools.
Register
Meaning
CONTROL[1]
65520 (dec) FFF0 (hex) = enable / disable HTTP or FTP/TFTP
CONTROL[2]
Indicates the error status. Possible return codes include:
0x000 (Success): MSTR block with operational code 65520 was called and the enabled state of HTTP or FTP/TFTP was changed.
0x5068 (Busy): MSTR block with operational code 65520 was called within 2 seconds of the previous call (regardless of return code from previous call).
0x4001 (Same state): MSTR block with operational code 65520 was called to change the enabled state of HTTP and FTP/TFTP to the states they were already in.
0x2004 (Invalid data): MSTR block with operational code 65520 was called and the data in the control block did not match the specifications.
0x5069 (Disabled): If the HTTP or FTP/TFTP service was already disabled via the Control Expert interface when the MSTR block with operational code 65520 was called to change the state of the disabled service.
CONTROL[3]
Set this register to 1
CONTROL[4]
CONTROL[5]
Module slot number and destination ID
High byte = Module slot number communication module slot
Low byte = Destination ID
CONTROL[6]
Request mode
Bit 0 (LSB) = 1: Enable FTP/TFTP
Bit 0 (LSB) = 0: Disable FTP/TFTP
Bit 1 = 1: Enable HTTP
Bit 1 = 0: Disable HTTP
CONTROL[7]
Set this register to 0
CONTROL[8]
CONTROL[9]
HTTP, FTP, and TFTP service state changes made by MSTR with operation code 65520 (dec) are overridden by the configured value when the module is power-cycled or reset and when a new application is downloaded to the module.
Here are some examples:
State Configured By Control Expert
Action attempted using MSTR with operation code 65520) (dec)
Result
Disabled
Any
MSTR returns error code 0x5069 (service was already disabled by configuration)
Enabled
Disable
MSTR returns code 0x000 (success).
  • Another MSTR block action enables the service
    --OR--
  • The module is reset or power-cycled
    --OR--
  • A new application is downloaded with the service disabled by configuration
Enable
MSTR returns error code 0x4001 (same state). No change made.