1. USE usb2RS232 cable to connect to the CPU. CPU is connected to Ethernet module, ControlNet module and device Net module.
2. Open RSlinx. Delete all previous drivers(if cannot delete just restart Rslinx while everything is disconnected)!!! Configure a driver called RS-232 DF1 drivers. Select correct COM and baud rate to establish the driver. Should be able to see all the above devices in RSwho under this driver. Then select the Ethernet module, right click to change the properties, where we can set the IP and subnet mask for the Ethernet module.
3. Still in RSlinx, configure a driver for Ethernet. The name of driver is "Ethernet devices". When configure it there will be a window pop out asking for the IP address, put the address you set in step 2 into station 0, click okay. Then all above devices on the same backplane will have the same IP address will show up in RSWho.
3. Open RSLOGIX5000, should be able to see the devices on the same chassis in WhoActive.
SIEMENS:
1. ALL IP SETTINGS CAN BE DONE IN TIA PORTAL as long as the PLC is connected with Ethernet to the computer(workstation).
2.open TIA portal, first create the project without a in-predefined device, then start device detection
3.after successfully detected of the device, go to the project tree and select "online & diagnostics", in the menu we have a lot of options such as assign IP address or formatting the SD card, etc...
For using the IoT module for siemens PLC:
1. for setting the IP address and subnet mask: please refer to IoT2000 setup in the google drive(miles.luo.xl@google.com). The firmware of IoT2000 is dumped to the SD card and then used in the IoT2040 module in my case. It works.....
2. For installing the node-red please refer to the PDF showing the steps(miles.luo.xl@google.com). One thing to note is that all installations should be with the internet connection of the IoT module! Installing the nodes for S7 communication and Azure IoT-hub then. Refer to the PDF or go to the website of node-red. If it somehow doesn't work just simply format the SD card in TIA portal!
The code to start node red in the IoT module's OS: node /usr/lib/node_modules/node-red/red &
Current flow is stored at /home/root/.node-red/ can ls and rm the undesired flow (the folder is invisible for WINscp)
3. Follow the setting in this video to set up a flow. S7 reading value------>construct a payload string in correct format------>upload to IoT using the Azure IoT hub node. Done! The thing is to correctly construct a payload string in the correct format.
{
"deviceId": "testenode1",
"key": "cw3nniq77BbjpOCDLqb7xEFTU509HeR6Ki1NwR20jj0=",
"protocol": "amqp",
"data": "{tem: 25, wind: 20}"
}
4. Use the flow in this link to register the device in IoT hub:https://flows.nodered.org/node/node-red-contrib-azure-iot-hub. After registering we will have a key to access the hub.
For using the IoT module with AB PLC:
No comments:
Post a Comment