RTCP setup for 5axis A/B table/table horizontal mill

Moderators: TomKerekes, dynomotion

User avatar
daredevil
Posts: 39
Joined: Sun May 17, 2020 7:39 am

Re: RTCP setup for 5axis A/B table/table horizontal mill

Post by daredevil » Mon Sep 28, 2020 6:25 pm

TomKerekes wrote:
Sun Sep 27, 2020 1:23 am

Code: Select all

#include "KMotionDef.h"

#define TMP 10 // which spare persist to use to transfer data
#include "KflopToKMotionCNCFunctions.c"

void main()
{
	for (;;)
	{
		ScreenScript("WinMsg:DlgName;IDC_SingleStep;BM_CLICK;");
		Delay_sec(0.5);
	}
}
Hi Tom
I have created the code button with no results, also changing the "for" cycle,
could please confirm me the ScreenScript("WinMsg:DlgName;IDC_SingleStep;BM_CLICK;") syntax?
thanks
dd

User avatar
TomKerekes
Posts: 2676
Joined: Mon Dec 04, 2017 1:49 am

Re: RTCP setup for 5axis A/B table/table horizontal mill

Post by TomKerekes » Mon Sep 28, 2020 6:54 pm

Hi did,

I think you are missing a semicolon. Why not copy my syntax? It worked for me. I ran it from KMotion.exe. If you are running it from a KMotionCNC User Button it should not be configured to wait.
Regards,

Tom Kerekes
Dynomotion, Inc.

User avatar
daredevil
Posts: 39
Joined: Sun May 17, 2020 7:39 am

Re: RTCP setup for 5axis A/B table/table horizontal mill

Post by daredevil » Tue Sep 29, 2020 9:00 am

Hi Tom
I have double checked the program using your syntax,
and finally I discovered that using the "Basic 6 Axes" screenset (which is my kmotioncnc setup for 5 axis mill) the Single Step button is inside a "toolbar",
so I believe that your code cannot "reach" the single step button inside the toolbar:

could you please send me a syntax for clicking it inside the toolbar?

thanks
all my best
dd

User avatar
TomKerekes
Posts: 2676
Joined: Mon Dec 04, 2017 1:49 am

Re: RTCP setup for 5axis A/B table/table horizontal mill

Post by TomKerekes » Tue Sep 29, 2020 5:31 pm

Hi dd,

You are correct. Screen Script commands only work for "Custom" Screens. There isn't currently a method to send messages to non-Custom Screens or to controls within controls.

Why not create a Custom Screen? You probably want to add a toggle button to turn on/off the single stepping.
Regards,

Tom Kerekes
Dynomotion, Inc.

User avatar
daredevil
Posts: 39
Joined: Sun May 17, 2020 7:39 am

Re: RTCP setup for 5axis A/B table/table horizontal mill

Post by daredevil » Wed Sep 30, 2020 5:23 am

Thanks Tom
I will make a custom screen set,
all my best
dd

User avatar
daredevil
Posts: 39
Joined: Sun May 17, 2020 7:39 am

Re: RTCP setup for 5axis A/B table/table horizontal mill

Post by daredevil » Wed Sep 30, 2020 2:26 pm

I Tom,
I made a custom 6 axis screen using the new probing screens,
and now the code works! thanks!

1) which is the simplest code to stop a kmotion thread (as the HALT button in the Kmotion.exe C program windows)?

2) with the new screen set the gviewer is inside the main kmotioncnc windows (split/entire view), but I need ta view/control the toolpath gcode also in the separate gviewer windows which I can resize to full screen for better inspection, I have put the gviewer button in the screen set and I have a separate gviewer windows but the toolpath is viewable only in the main kkmotioncnc windows,
how can I view the toolpath in the separate windows as I did in the standard 6 axis screen? please see the images below
kcnc1.JPG
kcnc1.JPG
thanks
all my best
Attachments
kcnc2.JPG

User avatar
TomKerekes
Posts: 2676
Joined: Mon Dec 04, 2017 1:49 am

Re: RTCP setup for 5axis A/B table/table horizontal mill

Post by TomKerekes » Wed Sep 30, 2020 4:16 pm

Hi dd,
1) which is the simplest code to stop a kmotion thread (as the HALT button in the Kmotion.exe C program windows)?
You might Execute a different(Dummy do nothing) program in the Thread. In general I try to avoid "killing" Threads whenever possible because sometimes a Thread might be in the middle of doing something and if it dies right at the wrong time it leaves things in an invalid state. So it is better to ask the Program to "please exit" say by setting a Virtual Bit. Another option might be to do the work in the Init Program's forever loop and enable/disable it with a Virtual Bit.

how can I view the toolpath in the separate windows as I did in the standard 6 axis screen? please see the images below
Sorry that isn't supported. You could make the View Screen (or another Screen) with basically only the Viewer Control so it uses most all of the screen.
Regards,

Tom Kerekes
Dynomotion, Inc.

User avatar
daredevil
Posts: 39
Joined: Sun May 17, 2020 7:39 am

Re: RTCP setup for 5axis A/B table/table horizontal mill

Post by daredevil » Wed Sep 30, 2020 6:45 pm

Many thanks Tom
dd

User avatar
daredevil
Posts: 39
Joined: Sun May 17, 2020 7:39 am

Re: RTCP setup for 5axis A/B table/table horizontal mill

Post by daredevil » Thu Oct 01, 2020 10:06 am

Hi Tom
I need a confirmation about the default 4/5th axis direction "rule" in kmotioncnc viewer,
at the moment my horizontal 5 axis mill is configured such this (taken from the official pocketnc site):
ASSI POCKETNC.png
this means that if the B plate rotates CCW, it goes in the + sign direction
and that if the A table rotates putting the B table vs the end mill means + sign direction
this is correct from the table point of view (where there is the work piece) according to the respective linear axis Y & X (right screw vs linear + direction)

this is also confirmed by this official online simulator: https://sim.pocketnc.com

Kmotioncnc viewer seems to consider instead the "mill" point of view also for the direction of A & B axis (which is commonly used and right for the linear axis X Y Z) and so when I simulate a 5 axis gcode the mill goes in the opposite angular directions.

Based on your great experience and know-how which is your best recommendation for the A & B rotary direction sign setup?
the piece point of view or the mill point of view? is it possible to change the rotary direction sign mill in the viewer simulation?
I am a little confused cause online you find opposite points of view....

thanks
dd

User avatar
TomKerekes
Posts: 2676
Joined: Mon Dec 04, 2017 1:49 am

Re: RTCP setup for 5axis A/B table/table horizontal mill

Post by TomKerekes » Thu Oct 01, 2020 4:45 pm

Hi dd,

I think of it like drawing with a pen on paper. The CAD data should be what is to be drawn on the paper regardless of the machine configuration. So if the machine moves the paper instead of the pen it should move the opposite directions. Similarly with angles the CAD should specify how the tool should be oriented. If the machine rotates the part instead it should do the opposite.

So if everything in the diagram is reversed I think you end up with a proper right hand rule configuration which I would expect to match what GCode Viewer does.

Can you describe what your machine actually does?

HTH
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply