Labview UI project for Linuxcnc

More
6 years 1 month ago #182307 by auto-mation-assist
I have been testing the status reladed NML Commands listed in emc.hh and here is what I found.

Please recall that: rmc or RMC - is equal to - emc or EMC for my development work.

The below 10 commands for status are not completely handled by LinuxCNC
in "any mode" and appear to have no way to process these commands further
at the present time. I don't see these in the allowed "instant command" lists.
Type 199 AXIS_STAT type appears to be unknown. RMC_RPIN_STAT:3199
is custom to my system (RPIN = Remote controlled HAL pin)

I only listed these for manual mode but other modes give the same results.

rmctaskmain - rmctaskmain - can't do that (RMC_JOINT_STAT:198) in manual mode
rmctaskmain - rmctaskmain - can't do that (UNKNOWN:199) in manual mode
rmctaskmain - rmctaskmain - can't do that (RMC_TRAJ_STAT:299) in manual mode
rmctaskmain - rmctaskmain - can't do that (RMC_TASK_STAT:599) in manual mode
rmctaskmain - rmctaskmain - can't do that (RMC_TOOL_STAT:1199) in manual mode
rmctaskmain - rmctaskmain - can't do that (RMC_AUX_STAT:1299) in manual mode
rmctaskmain - rmctaskmain - can't do that (RMC_SPINDLE_STAT:1399) in manual mode
rmctaskmain - rmctaskmain - can't do that (RMC_COOLANT_STAT:1499) in manual mode
rmctaskmain - rmctaskmain - can't do that (RMC_LUBE_STAT:1599) in manual mode
rmctaskmain - rmctaskmain - can't do that (RMC_RPIN_STAT:3199) in manual mode
Note: RMC_RPIN_STAT:3199 is custom to my system (RPIN = Remote controlled HAL pin)


LinuxCNC returns lots of 4 or 8 byte pointer range errors for these
status commands and returns no data. But at least they give a debug response.
I think that these errors could be listed in the build info of LinuxCNC as warnings when compiling but not sure.

RMC_MOTION_STAT TYPE 399 1 error
RMC_IO_STAT TYPE 1699 761 errors
RMC_STAT TYPE 1999 761 errors

A complete list of error messages is in the attached file
The following user(s) said Thank You: Aciera

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

More
6 years 1 month ago #182564 by auto-mation-assist
I have the MOTION_STAT command working now and displaying its values in the debugger.

If the machine is not turned on and in estop mode the RMC_MOTION_STAT command gives this reply which is good:

rmctaskmain - Issuing RMC_MOTION_STAT -- ( +399,+8228, +8, 1,0.000000,0.000000,0.000000, +0, +0, +0,\000,\000, +0, +0,\000, +0,\000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000


If the machine is out of estop and turned RMC_MOTION_STAT command gives this reply which is bad.

libnml/cms/cms_dup.cc 472: CMS_DISPLAY_ASCII_UPDATER: int 1072693248 is too large. (Use type long.)
libnml/cms/cms_dup.cc 472: CMS_DISPLAY_ASCII_UPDATER: int 1058780665 is too large. (Use type long.)
libnml/cms/cms_dup.cc 472: CMS_DISPLAY_ASCII_UPDATER: int 1563164632 is too large. (Use type long.)
libnml/cms/cms_dup.cc 472: CMS_DISPLAY_ASCII_UPDATER: int 663211969 is too large. (Use type long.)
rmctaskmain - Issuing RMC_MOTION_STAT -- ( +399,+8228, +19, 1,0.000000,-nan,0.000000, +0, +0, +0,\000,\000, +0, +0,\000, +0,\000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000

This results in the "-nan" (not a number) error. The problem occurs due to line 470 in cms_dup.cc not having sufficient number of 9 digits to make a valid length comparison. The present length was likely fine in the past but this needs to increase to at least "if (x > 9999999999" instead of the present "if (x > 9999999".

This will result in the good response:

rmctaskmain - Issuing RMC_MOTION_STAT -- ( +399,+8228, +11, 1,0.000000,0.000000,0.000000, +0, +0, +0,\000,\000, +0, +0,\000, +0,\000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000

Text file for the above is attached.

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

More
6 years 1 month ago #182569 by rodw
So this resolves the error messages you listed in your previous post?
Would it be possible for you to create a pull request just of that error foe inclusion in master branch?

I've been trying to follow along as best I can but I do wonder why we have hard coded values in the code.

Can the value be deduced from the environment?
If it has to be hard coded surely it would be better to put an equate and appropriate comments in cms_dup.hh?


RodW

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

More
6 years 1 month ago - 6 years 1 month ago #182669 by auto-mation-assist
Yes that problem went away. I had inserted this comment into the file as future reference:

* Last change: Johannes Fassotte - Auto-Mation-Assist 09-17-2020
*line 472 - CMS_STATUS CMS_DISPLAY_ASCII_UPDATER if (x > increase to 9999999999 from if (x > 9999999
*line 528 - CMS_STATUS CMS_DISPLAY_ASCII_UPDATER if (x > increase to 9999999999 from if (x > 9999999

I have never done a pull or created a pull request.

I have all the status request coded now so I can execute the cmds and at least see a response and the variable values they contain in the debugger. They wont do anything else but that is fine for now.

This is the list from my rmcmaintask.cc

case RMC_JOINT_STAT_TYPE:
break;
case RMC_AXIS_STAT_TYPE:
break;
case RMC_TRAJ_STAT_TYPE:
break;
case RMC_MOTION_STAT_TYPE:
break;
case RMC_TASK_STAT_TYPE:
break;
case RMC_TOOL_STAT_TYPE:
break;
case RMC_AUX_STAT_TYPE:
break;
case RMC_SPINDLE_STAT_TYPE:
break;
case RMC_COOLANT_STAT_TYPE:
break;
case RMC_LUBE_STAT_TYPE:
break;
case RMC_IO_STAT_TYPE:
break;
case RMC_STAT_TYPE:
break;
case RMC_RPIN_STAT_TYPE: /* remote controlled HAL pins */
break;

There are several that report 4 or 8 byte memory pointer errors and will not execute. I will look at those again and post info to see if anyone can help figure out what is causing these errors to occur.
Last edit: 6 years 1 month ago by auto-mation-assist.

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

More
6 years 1 month ago #182687 by rodw

auto-mation-assist wrote: This is the list from my rmcmaintask.cc


Where is this file? It did not come up in a search on the git for master branch.
Where are the equates #defined?


RodW

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

More
6 years 1 month ago #182706 by auto-mation-assist
Sorry I should have been more clear: You will not have rmcmaintask.cc. The prefix rmc in that name refers to my development system used to for this project.

The source version src/emc/task/emctaskmain. The case statements I listed before where added into this file along with others in the switch statements so that these will be allowed to execute.

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

Time to create page: 0.339 seconds
Powered by Kunena Forum