I don't believe the issue is related to state tags.

I've done a fair bit of work with extending state tags to include some more
useful data as motion pins at run time.
All State tags does is add an additional structure  to emcStatus that
records the interpreter state of a given segment. So the interp primitives
update the tags.
The only annoyance is that interp is written in C++ and motion is in C.
Interp keeps its own C++ status structure which is copied across to
emcStatus ( using discrete read and write functions in interp). But that
well and truly predates state tags.

I recall reading the source notes you refer to and I think what it means is
that as long as you use the enums when referring to status bits, it  does
not matter where the data is stored as the enum applies the correct index
to the data. The other issue is that some of the underlying tag data enums
are #defined private to interp which requires hard coded numerics on the
motion side which is not desirable and could introduce errors. This refers
https://github.com/LinuxCNC/linuxcnc/pull/900


Rod Webster
*1300 896 832*
+61 435 765 611
VMN®
www.vmn.com.au



On Thu, 29 Oct 2020 at 06:09, Johannes Fassotte <
[email protected]> wrote:

> Did the addition of state tags mess up status replies that are routed to
> my TCP connected UI? Data is being sent even though it was not requested
> at fixed intervals. This problem appeared after upgrading from a early
> version of 2.9 pre0 master to current version of 2.9 pre0. master. No
> changes have been made to it.
>
> As far as I know the normal replies to status requests are handled by
> the emcmaintask at whatever rate is requested by the remote as long as
> it slower than the timing rate set in the .ini file. The below shows
> that there are seven data transmissions sent that are causing serious
> problems at regular intervals.
>
> The normal transmission of status data to the remote is in response to a
> status peek request of buffer 2 and such a request is always constant in
> size with the location of data within it also being constant unless the
> LinuxCNC configuration is changed. Inserting a bunch of added data
> preset  intervals is really bad when thinking about this from a remotes
> point of view. In such a case the remote has to be expecting it and as a
> minimum need to know the size or length of the data.  Neither of those
> two requirements can be met right now. I suspect  that two separate
> processes are fighting for control with the remote ending up being the
> looser. A real time process and a none real time process.
>
> I have looked at actual length of the data that is causing this issue
> which may be 72980 bytes. Other other data is likely being merged into
> it from the remote status peek requests. The long one on the end of each
> bad data segment is likely the TCP buffer filling up due to the remotes
> inability to empty it because of being locked out for a while.
>
> I'm working around this issue temporarily by pulling the problem data
> out of the TCP buffer and dumping it. This does cause the loss of some
> status updates but allows me to continue to work on other UI work.
>
> Is the bad data is likely being generated separately by a real time task
> that sends it out at specific intervals?. The below pattern is repeating
> over and over. Additional comment at the end.
>
> Data error 74272 lenght is not 103716, Bad data Lenght: 74272 Data Not
> part of emcStatus
> Data error 74224 lenght is not 103716, Bad data Lenght: 74224 Data Not
> part of emcStatus
> Data error 74276 lenght is not 103716, Bad data Lenght: 74276 Data Not
> part of emcStatus
> Data error 74204 lenght is not 103716, Bad data Lenght: 74204 Data Not
> part of emcStatus
> Data error 74424 lenght is not 103716, Bad data Lenght: 74424 Data Not
> part of emcStatus
> Data error 74436 lenght is not 103716, Bad data Lenght: 74436 Data Not
> part of emcStatus
> Data error 280176 lenght is not 103716, Bad data Lenght: 280176 Data Not
> part of emcStatus
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> Data error 74272 lenght is not 103716, Bad data Lenght: 74272 Data Not
> part of emcStatus
> Data error 74224 lenght is not 103716, Bad data Lenght: 74224 Data Not
> part of emcStatus
> Data error 74276 lenght is not 103716, Bad data Lenght: 74276 Data Not
> part of emcStatus
> Data error 74204 lenght is not 103716, Bad data Lenght: 74204 Data Not
> part of emcStatus
> Data error 74204 lenght is not 103716, Bad data Lenght: 74204 Data Not
> part of emcStatus
> Data error 74204 lenght is not 103716, Bad data Lenght: 74204 Data Not
> part of emcStatus
> Data error 280628 lenght is not 103716, Bad data Lenght: 280628 Data Not
> part of emcStatus
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> Data error 74220 lenght is not 103716, Bad data Lenght: 74220 Data Not
> part of emcStatus
> Data error 74276 lenght is not 103716, Bad data Lenght: 74276 Data Not
> part of emcStatus
> Data error 74276 lenght is not 103716, Bad data Lenght: 74276 Data Not
> part of emcStatus
> Data error 74204 lenght is not 103716, Bad data Lenght: 74204 Data Not
> part of emcStatus
> Data error 74204 lenght is not 103716, Bad data Lenght: 74204 Data Not
> part of emcStatus
> Data error 74204 lenght is not 103716, Bad data Lenght: 74204 Data Not
> part of emcStatus
> Data error 280628 lenght is not 103716, Bad data Lenght: 280628 Data Not
> part of emcStatus
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> 103716 <<<<< Data bytes matches with what was sent (maintask)
> Data error 74272 lenght is not 103716, Bad data Lenght: 74272 Data Not
> part of emcStatus
> Data error 74224 lenght is not 103716, Bad data Lenght: 74224 Data Not
> part of emcStatus
> Data error 74276 lenght is not 103716, Bad data Lenght: 74276 Data Not
> part of emcStatus
> Data error 74204 lenght is not 103716, Bad data Lenght: 74204 Data Not
> part of emcStatus
> Data error 74204 lenght is not 103716, Bad data Lenght: 74204 Data Not
> part of emcStatus
> Data error 74204 lenght is not 103716, Bad data Lenght: 74204 Data Not
> part of emcStatus
> Data error 280628 lenght is not 103716, Bad data Lenght: 280628 Data Not
> part of emcStatus
>
> I have read some notes within files that the index position of the tags
> within a enum is not important. This struck me as strange since then the
> only way to find the right one would by through a search of some kind
> for name instead of direct addressing. This would seem to defeat part of
> the purpose of tags due to decreasing speed.  I mention this because a
> remote would likely expect consistency in data locations.
>
>
>
> _______________________________________________
> Emc-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-developers
>

_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to