Beilai Technology Builds TwinCAT 3 software to communicate with BL200EC IO module
Views : 5933
Author : Jeakie
Update time : 2023-06-27 15:11:51
Beilai Technology Builds TwinCAT 3 software to communicate with BL200EC IO module
The Beilai Technology BL200EC coupler supports the distributed IO of the standard EtherCAT bus protocol. The coupler supports a maximum input of 1024 bytes, a maximum output of 1024 bytes, and supports 32 extended IO modules. It is an IO module independently produced by Beilai Technology.
1.1.1 Example of communication between TwinCAT 3 software and BL200EC
1. Prepare IO modules: coupler BL200PN, digital output module M2082, digital input M1081, analog input module M3401, analog output M4043. Module assembly and wiring refer to 3 product installation, 4 connection equipment operation.
2. Connect the network port ETH1 of the BL200EC to the network port of the PC. Do not connect the network port of the BL200EC wrongly, and power on the BL200EC coupler.
3. Import the XML file
Copy the XML file (BL200EC-v1.01.xml) to: ...:\TwinCAT\3.1\Config\Io\EtherCAT, and load the XML to TwinCAT as shown in the figure below. Note: When the XML file in this folder is updated, you must re-click to download the device description file.
TwinCAT loads XML file:
TwinCAT update device information:
4. Open the TwinCAT XAE software, click [FILE] -> [New] -> [Project] in turn, and the interface as shown in the figure below will pop up.
TwinCAT Create Project:
Project Creation:
Select [TwinCAT Projects] as shown in the interface and select [TwinCAT XAE Project] in the middle of the interface, and keep the default (name, location, solution name can be modified according to needs), and click the [OK] button.
5. Scanning equipment
Click [I/O]->[Device]->[Scan], and click on the pop-up interface: OK—OK—Yes—Yes.
Scan BL200EC:
OK Scan:
Check the "Local Area Connection" network card
Select network card:
Running TwinCAT:
Scan to the Box1 (BL200EC) coupler, and the module information connected to the coupler is below Box1.
TwinCAT scanning to BL200EC:
6. Data interaction
Check whether the BL200EC coupler is in the OP state
BL200EC status:
Digital output and analog output
Take M2082 as an example: To make channel 1 of the module output, click "Write" in the "Online" window corresponding to the module "Output[1]", and enter the value "1" in the "Dec" column of the dialog box And click "OK", you can see that the channel indicator light corresponding to the module is on, and the software interface can display the written value at the same time. Similarly, the operation method of the analog AO output M4043 module is the same, as shown in the figure below:
TwinCAT Control DO:
TwinCAT controls AO:
Digital and analog inputs
Take the M1081 module as an example: if the module has a signal input, it can be monitored in the "Inputs" of the module. Similarly, the viewing method of the analog AI input M3041 module is the same, as shown in the figure below:
TwinCAT collects DI data:
The Beilai Technology BL200EC coupler supports the distributed IO of the standard EtherCAT bus protocol. The coupler supports a maximum input of 1024 bytes, a maximum output of 1024 bytes, and supports 32 extended IO modules. It is an IO module independently produced by Beilai Technology.
1.1.1 Example of communication between TwinCAT 3 software and BL200EC
1. Prepare IO modules: coupler BL200PN, digital output module M2082, digital input M1081, analog input module M3401, analog output M4043. Module assembly and wiring refer to 3 product installation, 4 connection equipment operation.
2. Connect the network port ETH1 of the BL200EC to the network port of the PC. Do not connect the network port of the BL200EC wrongly, and power on the BL200EC coupler.
3. Import the XML file
Copy the XML file (BL200EC-v1.01.xml) to: ...:\TwinCAT\3.1\Config\Io\EtherCAT, and load the XML to TwinCAT as shown in the figure below. Note: When the XML file in this folder is updated, you must re-click to download the device description file.
TwinCAT loads XML file:
TwinCAT update device information:
4. Open the TwinCAT XAE software, click [FILE] -> [New] -> [Project] in turn, and the interface as shown in the figure below will pop up.
TwinCAT Create Project:
Project Creation:
Select [TwinCAT Projects] as shown in the interface and select [TwinCAT XAE Project] in the middle of the interface, and keep the default (name, location, solution name can be modified according to needs), and click the [OK] button.
5. Scanning equipment
Click [I/O]->[Device]->[Scan], and click on the pop-up interface: OK—OK—Yes—Yes.
Scan BL200EC:
OK Scan:
Check the "Local Area Connection" network card
Select network card:
Running TwinCAT:
Scan to the Box1 (BL200EC) coupler, and the module information connected to the coupler is below Box1.
TwinCAT scanning to BL200EC:
6. Data interaction
Check whether the BL200EC coupler is in the OP state
BL200EC status:
Digital output and analog output
Take M2082 as an example: To make channel 1 of the module output, click "Write" in the "Online" window corresponding to the module "Output[1]", and enter the value "1" in the "Dec" column of the dialog box And click "OK", you can see that the channel indicator light corresponding to the module is on, and the software interface can display the written value at the same time. Similarly, the operation method of the analog AO output M4043 module is the same, as shown in the figure below:
TwinCAT Control DO:
TwinCAT controls AO:
Digital and analog inputs
Take the M1081 module as an example: if the module has a signal input, it can be monitored in the "Inputs" of the module. Similarly, the viewing method of the analog AI input M3041 module is the same, as shown in the figure below:
TwinCAT collects DI data: