...
- Use winscp.exe to create the following folder on the SmartServer IoT (you should be connected with the SmartServer apollo username and password):
/var/apollo/data/apps/adam-setup
- Transfer adam-setup.zip from the Starter Kit archive → Modbus RTU Channel folder to the SmartServer IoT folder that was created in the previous step.
- Use PuTTY to connect to the SmartServer SSH console.
- Enter the following command:
cd /var/apollo/data/apps/adam-setup
- Enter the following command:
unzip adam-setup.zip
- Enter the following command:
rm adam-setup.zip
- Power down the ADAM-4150 module by unplugging the bottom power supply connector.
- Move the configuration switch from the Normal to Init position.
Power up the ADAM-4150 module by plugging in the bottom power supply connector. With the following step, the ADAM-4150 module to setup to use Modbus address 01 and to communicate at 19200 Baud, no parity, and one stop bit.
Enter the following command:
node adamConfig.js 01 7
This command configures the ADAM-4150 module to use a 19200 Baud serial Modbus at address 01.
You should see a result similar to the following:- Power down the ADAM-4150 module by unplugging the bottom power supply connector.
Move the configuration switch from the Init to Normal position. If you neglect to move the switch to the Normal position, the module will not use the Modbus settings that were just programmed.
Power up the ADAM-4150 module by plugging in the bottom power supply connector.
Note Note: It is only necessary to set the configuration switch as described in this procedure one time for the ADAM-4150 module. If you are not sure about the programmed state of the ADAM-4150 module, move the switch to the Init position and perform steps #9-13 above.
...
Now that the ADAM-4150 module is prepared to be accessed as a Modbus RTU device, with Modbus address of 01 and a 19200 Baud serial connection, the device can be added to the SmartServer IoT. To create a Modbus device, perform the following steps:
- /wiki/spaces/TEMP/pages/44041710Access the SmartServer IoT CMS by using the CMS tab on the Configuration UI, or by entering the URL https://[SmartServer IP address]/cms/#/login.
- Go to the Devices Types widget and click the Import button ().
- Select the ADAM-4150v20.dtp from the Start Kit Modbus RTU Channel folder in the DROP FILE HERE area.
- Click IMPORT FILE.
Notification messages will appear indicating that files are being uploaded and the CPU usage on the main CMS page will show increased activity. After about a minute, you should see a message similar to the one shown below. (Click to close All information messages.) - Click BACK on the Device Types widget.
- Go to the Devices widget, which will be used to add a Modbus device to the system. Take note of the device name and character cases that will be used in creating the device.
- Click the Create button () on the Devices widget and add a device as shown in the figure below (leave the Context field empty):
- Name: DIO
- Device category: Edge Device
- Click NEXT.
- Set the following fields as shown in the figure below:
- UID: 01:1
- Integration method: Manual assignment
- Owner: SmartServer IoT
- Driver: Modbus
- Device type: ADAM-4150
- Click SAVE.
- To provision the device, click the Action button () on the Devices widget for DIO device.
Select the Provision device menu option.
Within a few seconds, the DIO device fill should change from blue to green indicating that the device has be successfully provisioned. If the provision fails, confirm that the Modbus channel on RS-485-1 is set for 19200, no parity, and one stop bit as described in the Setting the RS-485 Configuration UI section.Warning Warning: With SmartServer IoT release 2.8, the Modbus engine is locked in to communicate to the device with the channel parameters already configured at device creation. If the Modbus channel parameters are changed, you will need to remove the Modbus device and recreate it.
...