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.

SendData on Public table


mjb Jul 10, 2012 10:10 PM

In one of our programs, we have a need to occasionally send the Public table back to LoggerNet in order for some items in RTMC to be updated in near real-time after some user interaction.

This works well, but we've noticed that calling SendData to deliver the Public table seems to not send recent changes to variables.

Am I right in assuming that the Public table is only updated with changes to Public variables at the end (or beginning?) of a scan cycle?

(So, the correct fix is to just delay sending the Public table till the next scan cycle?)


Dana Jul 11, 2012 03:44 PM

Does the program compile in PipeLine Mode or Sequential Mode?

Depending upon how the variables in question are being updated, if the program is running in Pipeline mode they may be getting updated after the SendData.

In Pipeline Mode, measurement tasks have first priority. Processing tasks take place when "time allows" (e.g., when higher priority tasks are not being serviced).

Dana W.


mjb Jul 11, 2012 08:41 PM

Sequential...

I was doing some work yesterday on this, and I think I've discovered the behaviour that's causing this.

Things work correctly when another instance of LoggerNet is the one updating the public variable in question. I believe the issue lies with timing and/or the method used to transfer the data back to LoggerNet via TCP.

We've turned on the "Keep PakBus Port Open" option for the station in question - I think what was happening was that when RTMC is commanding LoggerNet to update a variable, LoggerNet opens the PakBus port to make the change, and after doing so was shutting down the connection - right about when the station was trying to send the Public table back.

One other potential fix would be to invert the maintained connection direction (from LN->CR1000 to CR1000->LN) via either a PakBusTcpServer node, or via changing the IPPort configuration for the station. That way, the SendData traffic would travel from the CR1000 to LoggerNet via a different TCP path than the outgoing connection for the setting of the Public variable.

Does all that sound reasonable, or am I completely barking up the wrong tree?

Mike.


jtrauntvein Jul 12, 2012 09:38 PM

I believe that you are on the right track. When the connection is closed, there will be no link available for the logger to send the data packet. My recommendation would be to check the "PakBus Port Always Open" option.

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