Hardware central control one-button switch design scheme

1. Project requirements

1. The on-site teaching console has three hosts, and there are two hosts in the cockpit (without hardware control for the time being).

It is required to add two buttons (rebound, without self-locking type) on the teaching console, and use two buttons to control one-button startup and shutdown.

Second, program design

1. Add a switch card behind each host. Turn on and off by switching the card.

2. Make a main control module. Used to receive two IOs (switch variables). The main control module and all switch cards communicate through Ethernet and share a network segment.

3. Don't bother to use the magic package, and go directly to the hardware.

Three, the realization process

1, IO button

It adopts the industrial non-locking button, also called the start-stop box. Go straight to the installation. If you need to install the button directly on the teaching console on site, you need to prepare an electric drill and a hole saw in advance.

2. Main control board

The core function of the main control board is communication. Send switch command. - You can also send a forced shutdown command.

The button command here does not send a signal directly by detecting high voltage. It is recommended to use the detection of rising edge to distinguish.

for example:

For the shutdown button.

When a falling edge is detected, a power-on command is sent within 2s. If it exceeds 2s, send a forced shutdown command. (The reason why it is necessary to send a forced shutdown command is that our computer cannot be turned off with a single touch of the power button when it is in lock screen mode or not logged in,)

For communications:

Do not add unnecessary instructions: For example, if the main control board receives an unrecognized instruction, do not return it to Biren. The on-site switch card also has the same function, which causes the data to circulate wirelessly and the site is abnormal.

3, switch machine card ()

Protocol

1. Conditions of use
This version of the boot card is specially designed for LAN control, without encryption, and it is not recommended to connect to the Internet. The boot card uses RJ45
The interface is connected to the network, and the motherboard needs to have a redundant PCIE interface. This card needs to draw power from the PCIE card slot.
2. Install
[1] Insert the boot card into the PCIE slot of the motherboard. There is no requirement for the length of the PCIE slot, as long as it is PCIE.
[2] Insert the network cable into the RJ45 interface,
[3] There are two channels on the boot card (you can see from the back of the boot card), there is no difference between channel 1 and channel 2, one is connected to the main
board power sw pin, and the other is connected to the unplugged power sw plastic shell terminal.
Note: The power-on card does not process the key signal of the chassis, no matter whether the power-on card is powered on or not, it will not affect the normal use of the keys
3. Network distribution method
This power-on card supports TCP/UDP networking, and it is recommended to use UDP networking (development is relatively simple).
3.1 Configuration instructions, take the UPD method as an example :
[1] After the boot card is installed, it is necessary to ensure that the network port light of the boot card is normal, that is, the green light is always on, and the yellow light is flashing (or always on).
[2] Open the network distribution tool ConfigTool.exe, as shown in step 1, click Search Device, if no device is found, try
Try to click several times; as shown in step 2, select the new device found; in step 3 as shown in the figure, set the working mode to UDPServer,
Other parameters are set according to actual needs; step 4 in the figure below, click to write parameters; step 5 in the figure below, click restart to take effect;
Wait for the boot card to restart.
First post a picture of the accompanying steps
Below is a diagram of the detailed setup of our card:

Local IP: It is the information that needs to configure the switch card

Target IP: It is our main control board. Note that the information must be filled in correctly. 

 3. Host computer

The final link in the system is the computer. If we are shutting down, we find that the network cable light behind the switch card does not flicker. Indicates the current switch card.

Entering Bios needs to be set:

ERP READY, turn it off, this is a power-saving function, so that the motherboard will power off all ports after shutdown, which will affect the network or PCIe devices to start the computer. In addition, look for wakeup on lan or ring, there is also called wakeup on pcie, set it to start

Gigabyte board: the erp setting is responsible for the wakeup on lan/ring (ring is through the telephone line and modem equipment) function.

It's over here.

There is a trace of loneliness engraved behind the glory

Guess you like

Origin blog.csdn.net/gaofei7439/article/details/124496250