saving the kmotion cnc jogged value to a permanent common variables

Moderators: TomKerekes, dynomotion

ajith
Posts: 65
Joined: Sat May 21, 2022 3:57 am
Location: TamilNadu

Re: saving the kmotion cnc jogged value to a permanent common variables

Post by ajith » Tue Jul 12, 2022 7:21 am

Respected sir,
An alternate approach might be to use a new screen and screen script with an edit control to enter the password. KFLOP C Programs can read Screen Script Edit Controls as well as write to them. So it should be possible to clear the edit control after the password is entered.
This what you replied for clearing the dropdown list box generated when the password is entered in the input message box.
but i can't understand the method you were suggesting.are you suggesting to create a screen script for entering the password?
i had tried to duplicate my input message box for my password screen but i could not find following options while developing the screen,
  • after typing my password and i need a "ok" button which check whether my entered password is correct or not. If the password is correct then just closes my password screen and returns back to my original screen.If my password is wrong i want to indicate the password is wrong and closes my password screen and returns back to original screen
  • if i press the cancel button also i need to navigate to my original screen
because i tried using the add screen script in my kmotion screen and when i press the cancel button it just closes my whole kmotion cnc screen.
i had attached my sample password screen
pass dia.PNG
pass dia.PNG (3.56 KiB) Viewed 1731 times

void CSetValue::OnOK()
{
UpdateData();

double v;

int result = sscanf(m_ValueString,"%lf",&v);

if (result==1)
{
m_Value = v;

POSITION pos = Recent.GetHeadPosition();
POSITION prev=pos;
for (int i=0; i < Recent.GetCount(); i++)
{
if (m_ValueString == Recent.GetNext(pos))
{
Recent.RemoveAt(prev);
}
prev = pos;
}

if (Recent.GetCount() >10)
Recent.RemoveTail();

Recent.AddHead(m_ValueString);
}
else
{
AfxMessageBox("Invalid Entry");
return;
}


CDialog::OnOK();
}
what is the purpose of this program?




I also have another question that is whether i can inactivate the function of the following highlighted button in the below kmotion screen image?
MY SCREEN.PNG
Regards,
Ajith Arawinth,

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

Re: saving the kmotion cnc jogged value to a permanent common variables

Post by TomKerekes » Tue Jul 12, 2022 5:24 pm

because i tried using the add screen script in my kmotion screen and when i press the cancel button it just closes my whole kmotion cnc screen.
i had attached my sample password screen
Use a different button that will switch back to your normal screen.

what is the purpose of this program?
That is the code KMotionCNC uses to add the Operator's entry to the Drop Down List.

I also have another question that is whether i can inactivate the function of the following highlighted button in the below kmotion screen image?
I don't understand what you are asking.
Regards,

Tom Kerekes
Dynomotion, Inc.

ajith
Posts: 65
Joined: Sat May 21, 2022 3:57 am
Location: TamilNadu

Re: saving the kmotion cnc jogged value to a permanent common variables

Post by ajith » Thu Jul 14, 2022 9:25 am

Respected sir,
MY SCREEN.PNG
I have two screens scripts assigned to two buttons which is used to navigate between them.one screen is the lock screen where i wants to set the gcode screen in "read only mode" and some buttons function need to be disabled.Another screen is unlock screen where i can be abled to read and write gcodes and all the button functions need to be enabled.but i tried to disable the buttons by changing its var to be 2 but it doesn't work. is there a way to disable the functions of button (without hiding the button) i have highlighted in the above screen and how it is done?




Regards,
Ajith Arawinth

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

Re: saving the kmotion cnc jogged value to a permanent common variables

Post by TomKerekes » Thu Jul 14, 2022 4:12 pm

No there isn't a method to disable normal buttons other than hiding them. For custom buttons you might remove any action they perform. I suppose you could replace those buttons with dummy buttons or labels that don't do anything.
Regards,

Tom Kerekes
Dynomotion, Inc.

ajith
Posts: 65
Joined: Sat May 21, 2022 3:57 am
Location: TamilNadu

Re: saving the kmotion cnc jogged value to a permanent common variables

Post by ajith » Thu Jul 21, 2022 12:11 pm

dear sir,
i execute gcode program of circle and opened my gviewer to verify its circumference but i cant get to view the path travelled by tool. The g-viewer just displays the movement of the tool without its path.
gview.PNG
the below image is my viewer setup dialogue box
view setup.PNG



regards,
Ajith Arawinth

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

Re: saving the kmotion cnc jogged value to a permanent common variables

Post by TomKerekes » Thu Jul 21, 2022 4:40 pm

Hi Ajith,

When using a Custom Screen the GCode is plotted to the GCode Viewer on the main screen.
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply