Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

Public variables with limited communication bandwidth


MortenS Jan 27, 2021 04:37 PM

Hi

I was wondering if public variables are "allways" transmitted to LoggerNet when connected ?

Or only transmitted if changed since last transmitted packet ?

The obvious answer would be "only if changed" but it would be nice to know :-)

Regards

Morten Skov


jtrauntvein Jan 27, 2021 10:09 PM

Public variables are only transmitted to the LoggerNet server when that table is polled.  The table can be set up to poll with scheduled collection but it, as well as the Status and DataTableInfo tables are disabled by default. If you set up the numeric monitor or a graph in the Connect Screen, LoggerNet will attempt to retrieve only the variables that you have set up.

The behaviour for the datalogger when the Public table polled is somewhat different as well.  When a final storage table is polled, the dataloggr reports the last records stored in the table.  With the Public table, the datalogger forms a record using the current state of all Public variables.  This can happen between scans or in the middle of scans.  If the record is reported within a scan, sometimes the information can be inconsistent because some variables report new values while others report values from the previous scan.

If there are variables that are trully accessed only within the datalogger program, I would recommend declaring them with Dim rather than Public.  For me, the only reasons to declare a variable as Public are if those variables somehow make up a controlling or reporting interface for the Datalogger or if they contain information that is valuable for debugging purposes.


JDavis Jan 28, 2021 12:00 AM

If you are watching the entire Public table with something like the Table Monitor on the Connect screen, it asks for all variables in the table. That is whether the variable changed or not.

As mentioned, you can use Dim to keep variables hidden from the Public table. If occassionally you want to see them, add a separate table declared with a size of 1 record. You can sample the Dim variables in that table, which you want to see. Note that the Public table is the only one where you can change values. The other tables will be read only.


MortenS Jan 28, 2021 08:38 AM

jtrauntvein & JDavis

Thanks

Log in or register to post/reply in the forum.