Supported hardware and firmware
Cloud Notify using the Plain-Text TCP is supported on the CloudVPN router in firmware 3.7 and up. Please upgrade your firmware if you are running an older version.Activate Cloud Notify
Please first activate Cloud Notify (or start the 30 day free trial) if you haven't already.The Second step in Cloud Notify is setting up a data source. This is done by selecting a communication protocol and defining the variables. This article shows you how to do this for communication via the Plain-Text TCP protocol.
- Select a communication protocol
- Add variable
- Connect to the CloudVPN router and send data
- Test variables
- Manage variables
Select a communication protocol
You first have to select a communication protocol. This is the protocol that the CloudVPN router will use to communicate with the PLC.
- Go to the CloudVPN Portal Fleet Manager app, which is accessible from the Apps menu
in the top right corner if you are currently in a different CloudVPN Portal app.
- Open the Main menu
, go to Devices
, and select the concerning device.
- Click on the Add a service
icon in the left menu, select [Data source], and then select [Plain-Text TCP].
- Enter the requested information (details below) and click on [Add].
Field | Description |
---|---|
Name | Enter a name for the data source. |
Identifier | The identifier ensures that every data source remains unique, even if they share the same name. |
IP address |
Enter the IP address of your PLC. Leave empty if you're using an CloudVPN Agent. |
Password | Choose a password, you will need this later on. |
Polling sleep time | Leave this field to "None". |
Add variables
Once you've added a data source and selected a communication protocol, you can start adding variables. You can do this by following the steps below:
- Expand the Data source
service and go to [Variables].
- You can now choose to:
Manually add new variables
- Click on [
Add variable] in the bottom right corner.
- Enter the requested information (details below) and click on [Add].
Field | Description |
---|---|
Name | Enter a name for the variable. |
Identifier | The identifier ensures that every variable remains unique, even if they share the same name. |
Type | Select the variable's data type (bool, int, float, etc). |
Address | Choose an address for this variable (e.g. b1 or TemperatureZone6), you will need this later on. |
Factor | Multiplies the value (leave empty if the data type is boolean). |
Unit | Displayed text behind the value. |
You have now made the changes in the CloudVPN Portal, but these are not yet active in your device. You will need to push your changes to your device for them to take effect. During this next step, your device may temporarily disconnect and LAN communication may be temporarily interrupted . This may take a minute.
- Click [Push config to device] in the top right corner.
Next step
Import variables from a file (or device)
You can easily and effortlessly copy variables from one device to another by exporting the concerning variables (view the "Manage variables" part of this article) and then importing them in your new device. Alternatively, you can manually prepare your variables in the required CSV format to load them all at once into your configurator. The CSV file structure is explained in our Import variables article.
- Click on [Import from CSV-file] in the top right corner of the screen.
- Select a CSV file to import and click on [Open].
You have now made the changes in the CloudVPN Portal, but these are not yet active in your device. You will need to push your changes to your device for them to take effect. During this next step, your device may temporarily disconnect and LAN communication may be temporarily interrupted . This may take a minute.
- Click [Push config to device] in the top right corner.
Next step
Connect to the CloudVPN router and send data
The CloudVPN router is now listening and waiting for data. From the connected PLC you'll now need to connect to the CloudVPN router and then send the data at the moments you want to.
Plain-Text TCP is a line based protocol where each line is terminated by a newline (\n), carriage
return (\r), or a combination. Newlines are not allowed in arguments unless escaped. Arguments may be separated by several spaces, though recommended is the absolute minimum; no spaces if another separator was used, or one space if the space is the separator.
We also have a brief overview of possible errors you may encounter:
Connect to the CloudVPN router
The CloudVPN router is listening on port 9230 for a TCP connection. The exact steps on how to establish a TCP connection from your PLC may differ per manufacturer. If you're unsure whether your PLC support this, or how you can do this, please contact your manufacturer.
- Establish a TCP connection from your PLC to the CloudVPN router's LAN IP address (use 127.0.0.1 if you're using an CloudVPN Agent instead) on port 9230. For example, using netcat:
netcat 192.168.140.1 9230
If all went well, you should see the CloudVPN router's reply "HELO".
Now that you have a TCP connection, you need to connect to the data source that you created. To do so you'll need to know the IP address and password you entered when you created the data source.
- Establish a connection to the data source, using the IP address and password you entered for the data source earlier, using the following syntax:
DEVC <data source IP addres> <data source password>
For example:
DEVC 192.168.140.10 1234
If all went well, you should see the CloudVPN router's reply "DEVC OK".
Send data to the CloudVPN router
Now that you're connected, you can start sending data. To do so, you'll need to know the variable's address that you chose when you created the variable in the CloudVPN Portal.
- Send data to the CloudVPN router using syntax:
@<address>=<value>
The syntax of <value> differs per data type. An overview including examples is shown below.
Data type | Details and example |
---|---|
Boolean | t=True f=False Example: @bool=f |
Integer | Numeral value. Example:@int=153 |
Float | Point separated value. Example:@float=152.7 |
String | String length separated from the string value by a comma. Example:@string=6,Halted |
Close the connection
To close the connection you can use the EXIT command:
EXIT
Common errors
Below is an overview of common errors that you may encounter accompanied by a description.
Error | Description |
---|---|
EROR <message> | A general error response. The message should contain a readable explanation of what went wrong. The message may contain spaces, everything that comes after EROR will be the message. |
TGNF @<address> | The tag with the given address was not found. The PLC should stop sending data values for this address or the address should be added in the CloudVPN Portal data source and pushed to the CloudVPN router. |
INVL <message> | The value received by the CloudVPN router does not match the variable definition as it is configured in the CloudVPN Portal data source. The PLC should stop sending invalid data values for this address. |
Next step
Now that you can send data to the CloudVPN router, you can test if everything is configured correctly.Test variables
The test utility is used to check if all the added variables are set correctly. It displays each variable's current value if everything is configured correctly and the PLC sends data to the CloudVPN router. If not, the values will stay empty. The test utility will attempt to update values every 0.5 seconds. Please follow the steps below to test your variables.
- Expand the Data source
service, go to [Variables], and click on [Run test] at the top.
A connection will now be set up to stream the data directly to your computer, using:
Port | Transport protocol | Application protocol |
---|---|---|
443 | TCP | WebSocket |
You will see live values of all variables, if the configuration is set up correctly and the PLC sends data to the CloudVPN router, otherwise the values will stay empty.
Unexpected result?
If the test utility shows unexpected values, please check if the addresses and data types of all variables are entered correctly.
If you get no data at all, please also check that the above listed port and protocols are not being blocked by your computer's or company's firewall.Next step
Now that you've tested the variables, you can view our "Set up alarms" guide to start adding alarms.Manage variables
You can view all defined variables on the variables page:
- Expand the Data source
service and go to [Variables].
You can [Edit] individual variables, [Remove] individual or a selection of variables, and export all or a selection of variables.
Variables can be selected by clicking the checkbox on the left, or you can select them all by clicking the checkbox at the top.
Comments
0 comments
Article is closed for comments.