cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

Change subscription publish interval

Change subscription publish interval

sanX
New Contributor

Hi,

I am trying to send values every 100ms to InfluxDB. For that, I am using Telegraf and there I have configured a 100ms publishinterval and a 100ms samplinginterval. Data is generated with a PLC program every 100ms. Unfortunately, when I try to read the values in the Data explorer in Telegraf there are only values every 1s. I have checked the global subscription settings and it is configured with the minimum default 100000 μs setting and 100ms PublishInterval. I have also tried to send data every 200ms just to make sure that it is not a limit problem, but it continues to update every 1s.

Global subscription settings

I have the feeling that because Telegraf is reading the values from the Datalayer and the Datalayer updates every 1s, it is not able to read the values that are between. I have checked the ctrlX CORE documentation and there I do not find how to change the subscription properties and I only find that it is possible to change Global settings. Furthermore, when I check the subscription node of the variable I want to read, I see that the configuration is "publishInterval: 1000", but as it is a "read-only" property I can not change it. 

Client subscription

I hope there is a way to change this setting as it would be interesting to store data at ms level in influxDB.

Thank you very much in advance.

Best regards,

Nicolas

 

2 REPLIES 2

CodeShepherd
Community Moderator
Community Moderator

Your client needs to tell the subscription how fast it should be. Otherwise the standard is used.

 

https://127.0.0.1:8443/automation/api/v2/events?nodes=framework/metrics/system/cpu-utilisation-percent&publishIntervalMs=100

 

Alternatively you could create you own subscription with other standard settings. For more information see our online documentation.

Hi all,

the problem was in InfluxDB.

  • Everything was well configured as the subscription settings were the following:

Publish and sampling interval check in Data Layer

This configuration can be performed from the Telegraf app establishing a publish_interval = "100ms" and a sampling_interval = "100ms".

  • On the other hand, from InfluxDB the problem was that the window period was set up in "Auto" and even reading Raw data it was not possible to read each value every 100ms. For that, it is required to change to "Custom" and establish the "Window period" to 100ms and all the values will appear in the table without any "jump" between values.

InfluxDB configuration to visualize data at ms level

 

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist