Labview UI project for Linuxcnc

More
6 years 2 weeks ago #186338 by auto-mation-assist

KCJ wrote: That might could be cause by an entry in the TRAJ section of your INI...

If you have [TRAJ] MAX_LINEAR_VELOCITY try changing it to [TRAJ] MAX_VELOCITY and see what does (or does not) happen.

Cheers,
Kurt


I did check my .INI file and the value there is 1.5

I will eventually track this down,

Please Log in or Create an account to join the conversation.

More
6 years 2 weeks ago #186339 by auto-mation-assist
I'm running into a issue with jogging while working on some updates for jogging in my UI that
added "axis" and "joint jog" mode buttons and found some things that cause a lot of confusion.

The confusion is related to the sequence of the overload variables in the files listed below.
Please note that the line numbers are for my development system.

shcom.hh(107): extern int sendJogStop(int jnum, int jjogmode);
shcom.hh(108): extern int sendJogCont(int jnum, int jjogmode, double speed);
shcom.hh(109): extern int sendJogIncr(int jnum, int jjogmode, double speed, double incr);

emc.hh(382): extern int emcJogStop(int nr, int jjogmode);
emc.hh(383): extern int emcJogCont(int nr, double vel, int jjogmode);
emc.hh(384): extern int emcJogIncr(int nr, double incr, double vel, int jjogmode);
emc.hh(385): extern int emcJogAbs(int nr, double pos, double vel, int jjogmode);

And copies of the emc.hh file that gets put here after a compile:

\includee\emc.hh(382): extern int emcJogStop(int nr, int jjogmode);
\include\emc.hh(383): extern int emcJogCont(int nr, double vel, int jjogmode);
\include\emc.hh(384): extern int emcJogIncr(int nr, double incr, double vel, int jjogmode);
\include\emc.hh(385): extern int emcJogAbs(int nr, double pos, double vel, int jjogmode);

Below is a part of each line in emc.hh that shows were confusion is taking place.

JogStop(int nr, int jjogmode);
JogCont(int nr, double vel, int jjogmode);
JogIncr(int nr, double incr, double vel, int jjogmode);
JogAbs(int nr, double pos, double vel, int jjogmode);

It looks like jjogmode was just added on on the tail end when it should always remain
in the same location, as it does in shcom.hh.


I have changed the above four lines to the below in my system and will looking to see what other
changes need to be made due to these changes.

----

JogStop(int jnum, int jjogmode);
JogCont(int jnum, int jjogmode, double vel);
JogIncr(int jnum, int jjogmode, double vel, double incr);
JogAbs(int jnumr, int jjogmode, double vel, double pos);

In shcom.hh I changed "speed" to "vel".

----

My issue is that my jogstop commands are excepted in continuous jog mode by LinuxCNC but jogging never stops.
As I recall the joint "jjogmode" was never used in the past so I'm leaning that it could be associated
with my problem. From what I can see the added jjogmode number that I send is not showing up in debug messages of the
received NML jog command message. The other variables, axis and vel show up fine. Nothing follows the last comma right
after the velocity variable. I have read that there have been other reports of no jog stop but don't know how old those reports are or if they are associated. Working on this issue now.

I don't know what JogAbs was meant to be used for.

Please Log in or Create an account to join the conversation.

More
6 years 19 hours ago #187973 by auto-mation-assist
I recently started using the latest master so that I would get to far behind some of the additions and changes that may have been made without my usual renaming to RMC vice EMC. Thus I'm working with a unmodified master. Everything is working fine with the TCP command NML interface but not so much for the status one that peeks at the emcStatus buffer 2. With the latest version of master there is data sent to the remote that was not requested an is not part of the emcStatus data and is also not part of the data that linuxCNC sends back immediately after sending its status request acknowledgment

The unknown data that is sent back is actually 6 separate data transmission that replace the normal status data but in a format that is unknown and this data does not send an acknowledgement to my status request of any kind. A acknowledgement to a status request is required since it has the command serial number of the command that requested the data, along with buffer number it was sent to and the amount of data bytes that will be sent right after the acknowledgment which is the actual status data from the emcStatus buffer. The acknowledgment message has a length of 20 bytes.

The 6 data burst that are being transferred with unknown data and intended use are typically, 74308, 74276, 74204,74204, 74220 and 280356 bytes long but the number of bytes will vary., A search within this unknown data does show that some does contain the emcStutus sync word of FFFF FFFF FFFF FFFF FFFF FFFF which is present at the head of the status data itself but the position of this within the unkow data varies all over the place and status data is either invalid invalid or incomplete. This problem did not exists in the early version of master I was using which does not have a lot of the RTAPI items that appear to have been added. This unknown data does appear to be sent a fixed intervals that follow the status request rate to some degree.

The below picture as shows the captures of data sizes while remote status requests are send to buffer 2. When Ok is displayed the data bytes match what linuxCNC says it is sending in the acknowledgement message allowing status information to be properly decoded.



The below is a picture of the TCP Labview code that I use in the decode process with some added displays and notes for clarity. The code in upper right is doing the capture work. Length of the current and actual emcStatus data is 103716 bytes and size changes overtime due to updates within linuxCNC and it is thus important to decode the status reply acknowledgement message so that the proper number of bytes can be read by the next TCB buffer read to keep everything in sync.



The picture below display the contents of the false, bad unknown data case. This case is required for now to purge any data from the TCP buffer because the type of data and its content are unknown. Any data sent to the status port by linuxCNC is read and after 5ms has passed the length of data there is determined and stored in the loop on the upper right in the picture above for evaluation. The maximum size of the data allowed to be read is 500000 bytes which is sufficiently large to insure the data is not truncated before the length is determined.



These transfers of unknown data are very likely merging with the actual status replies by attaching themselves to the actual emcSatus buffer data.head or tail in a haphazard way.

I have posted some information like this on the developers net but one has come forward yet to explain exactly what this unknown data or where it is coming from. From what I can see it is just big blocks of all hex zero's. What makes this somewhat more difficult to track down is that not many people use the data that is normally available via the TCP server, even when there is no remote configured in the NML configuration file.

I do Thank Rod for his comments on the developer net.
The following user(s) said Thank You: rodw

Please Log in or Create an account to join the conversation.

More
6 years 18 hours ago #187979 by cmorley
I would suggest using git bisect to (hopefully) find the commit that caused it.

Chris
The following user(s) said Thank You: auto-mation-assist

Please Log in or Create an account to join the conversation.

More
6 years 18 hours ago #187986 by rodw

cmorley wrote: I would suggest using git bisect to (hopefully) find the commit that caused it.

Chris


You could also try V2.8 which is before the conversion to Python 3 was pushed.

Please Log in or Create an account to join the conversation.

More
6 years 10 hours ago #188000 by auto-mation-assist
Below are some values from the 03/06/2020 master and 09/20/master NML configuration files.
Somewhere in between these dates is when this problem occurred based on the zip files I have on hand.

What ever caused the below buffers size increases to get linuxCNC to run after compiling appears to be the problem. These very large changes indicate that there were major changes being made that effect emcStatus and toolSts buffers which I my opinion is causing compatibility issues.

# Top-level buffers to EMC for the 03/06/2020 master
B emcCommand SHMEM localhost 8192 0 0 1 16 1001 TCP=5005 xdr queue confirm_write serial
B emcStatus SHMEM localhost >>>> 20480 0 0 2 16 1002 TCP=5005 xdr
B emcError SHMEM localhost 8192 0 0 3 16 1003 TCP=5005 xdr queue

# These are for the IO controller, EMCIO
B toolCmd SHMEM localhost 1024 0 0 4 16 1004 TCP=5005 xdr
B toolSts SHMEM localhost >>>> 8192 0 0 5 16 1005 TCP=5005 xdr


# Top-level buffers to EMC for the 09/20/2020 master
B emcCommand SHMEM localhost 8192 0 0 1 16 1001 TCP=5005 xdr queue confirm_write serial
B emcError SHMEM localhost 8192 0 0 3 16 1003 TCP=5005 xdr queue
B emcStatus SHMEM localhost >>>> 170000 0 0 2 16 1002 TCP=5005 xdr

# These are for the IO controller, EMCIO
B toolCmd SHMEM localhost 2048 0 0 4 16 1004 TCP=5005 xdr
B toolSts SHMEM localhost >>>> 131072 0 0 5 16 1005 TCP=5005 xdr

The value 170000 is more than the 123904 or so actually required to run at the moment. But that has no effect on the issue as long as sufficient space is available for the data. However making buffer sizes up to 8 times present values does not give me good feelings at all. Is there any info available as to why such large changes were required in current master and details what all this space is going to contain?

The total size of the emcStatus data sent to the remote in the 03/06/2020 time frame of master is 9196 bytes. And has no issues with unknown data attaching itself to data transfers and thus the my false cause in my code I posted before is never executed. This is not the case for the 09/20/2020 version which has the increased buffer sizes. To me it appears that the unknown data transfer issue and the increase in buffer sizes are related in some way. I'm inclined to suspect that data is being moved around in a way that is not totally correct by the change that caused the buffer size increases and that remote access was never considered. Thus if this data is going to be routed to a remote it needs to have handshaking items like remote status request for accessing the emcStatus buffer. Perhaps it should even have have its own buffer to prevent conflicts.

LinuxCNC master dated as being 03/06/2020 version reports the below when running and talking to the remote status process.

(time=1604228111.357099,pid=2543): TCPSVR request received: fd = 5, serial_number=7204, request_type=1, buffer_number=2
(time=1604228111.357123,pid=2543): rcs_sem_post(360449) called.
(time=1604228111.357182,pid=2543): wrote 20 bytes to 5
(time=1604228111.357209,pid=2543): wrote 9196 bytes to 5

The unknown added data that attaches to or is sent with status request in the later masters never reports their presence like in the line directly above which makes me suspect that they are real time driven. It show up at regular intervals in burst of six in a row.

Please Log in or Create an account to join the conversation.

Time to create page: 0.089 seconds
Powered by Kunena Forum