How to configure publishing rate to Proficloud?
Where in PLCnext engineer can you define how often a variable is sent to the Proficloud? A couple of example scenarios:
- Publishing values at a defined frequency:
- E.g. If I'm measuring temperature and I want to only send the latest temperature value once every minute or once every hour?
- Publishing values when state changes:
- E.g. a boolean changed from false to true
Thanks,
Dave
Comments
Hi dhoysan,
currently you can not configure the Proficloud parameters in PLCnext Engineer, but you can do it via an configuration file (/etc/plcnext/device/Services/ProfiCloud/proficloud.settings.json).
You'll find there the following keys:
"sampling_buffer_size_elements": "10000", --> Buffer for the recorded elements - located in the RAM (which is the only limit)
"sampling_rate_ms": "1000", --> Sampling rate, in this case 1s. The values are stored in the sampling_buffer
"sending_buffer_size_elements": "100", --> the elements are copied with the sending rate from the samling buffer to the sending buffer
"sending_rate_ms": "1000", --> every seconds does the PLC try to send the elements in the sending buffer to the Proficloud.
Hope this helps,
Frank
Thanks Frank!
Based on your response it appears that you can set the frequency for how often data is sent to the Proficloud, but can you also configure it to only send data when the state of a variable changes? For example if I have a machine running for 8 hours, I don't need to store a data point every second to tell me its on. I only need to record when the machine turns off. This method helps save on bandwidth and the total amount of data stored.
Are there any plans to add configuration settings like these into PLCnext engineer instead of needed to modify the configuration file?
Thanks,
Dave
Hey Dave,
this is currently not possible and also not planned on short term.
If the application can run also with MQTT you can use maybe our MQTT app instead the TSD Proficloud stack...
Reg
Frank
Frank,
When you say MQTT app do you mean the MqttGdsConnector from Github?
Hi Rob,
yeah I mean this app, this app support also on change pub.
However, it is not possible to send TSD values via MQTT to the Proficloud, so you would have to go for maybe another cloud solution (like AWS or Azure).
Take care
Frank
Hi Frank
I tried finding the file on my 1152 controller but the Directory does not exist. I logged in via putty as admin!
Regards
Frans
Hi Frans,
That directory (
/etc/plcnext/device/Services/ProfiCloud
) should be on the PLC.Which directory is missing - ProfiCloud? Services? device?
If one of these directories has somehow been deleted, you could try a Type 1 reset to restore the factory default files - but this will also delete all user files on the PLC.
~ Martin.
Hi Frank
The Services folder is not there. Its a brand new controller and I an currently running data logging to proficloud on it!
Hmm ... can you please show the output of these two commands on the PLC?
cat /etc/plcnext/arpversion
and
ls -lsah /etc/plcnext/device
?