- Posts: 169
- Thank you received: 0
QtPVCP - Qt 5.9.5 - QLineEdit Issue - Work Around - Run From Line
I don't know if this is a fluke on my system or not. But, I have been trying for days to get Run From Line to work.
From Big John: You should be able to set a VCPLineEdit and name it. Then in the Run From Line actionButton set the actionName to
program.run:#<someVcpLineEditName>. I did and regardless of how I tried all this does is pass #<someVcpLineEdit> as a string to the run action where run(star_line=0) should receive the value of the VcpLineEdit.
In any case, I found a work around if anyone else has the issue. I know tomorrow there will be an update to master with a right click context menu but it may not work for some of my designs so I came up with the following:
1) Create a VcpLineEdit and name it lineNumber (Still need to make sure only integers are allowed to be entered. Coming soon)
2) Drag a StatusLabel in and name it starting_line_number. Set your fonts in the stylesheet property
3) Drag in an ActionButton and name it run_from_here. Set the text property to Run From Line. Set the fonts in the stylesheet. Leave the actionName blank. It will be set on the fly.
Now, open your mainwindow.py file and make your file look like mine. You can exclude all code that does not pertain to this as I have other functions set up for other stuff. You can read my other posts to understand that aspect. Pretty cool.
Here is what the code does.
It connects the label and VcpEdit.
def setStartingLineLabel(self):
Gets the value from the VcpLineEdit and stores it in a variable. Then it sets the StatusLabel to notify the user that the line number was read and matches the users desired target. Then it sets the actionName of the run_from_here button.
def clearStartLineLabel(self):
Resets the StatusLabel to empty once the Run From Line button is pressed.
When the button is pressed it now has the proper line number appended to the actionName like this program.run:int.
The program will then start from the entered line number.
I kinda like this method better because you have more control over when and what happens before the program starts. Also, feedback to let you know what you expect to happen will happen.
To use it, simply enter a line number in the text field and press enter. You will see the Status Label change to "Ready To Start @ (lineNumber). Then press Run From Line. Away you go. Easy Peasy!
Attachment not found
Attachment not found
If you have issues or concerns hit me back.
Don
Please Log in to join the conversation.
Sergey Sanych wrote (a):
That is, I stopped the machine, say, to clean the cutter - the chips were wound. He brought him out of the working area, did everything that was needed.
1stop the program
2 remember the location of the instrument
2.1 for such purposes, I usually use the command to remember the place where the program stopped
MDI_COMMAND = G28.1
3 cube food is convenient for me to clean or even replace the cutter
4 to return to the starting position such commands
MDI_COMMAND = G53G0X [# 5161]
MDI_COMMAND = G53G0Y [# 5162]
MDI_COMMAND = G53G0Z [# 5163]
Well, then run the program with the selected line, after turning on the spindle,
for convenience, drawing the appropriate buttons on the panel.
Please Log in to join the conversation.
Long story short, I like the idea but it may be a bit edge for main line incorporation.
In the mean time,,, Добро пожаловать. Счастливого тебе нового года.
Please Log in to join the conversation.
Basically, I put the machine in a specific mode that allows for Manual Handle Return. So, I place the program in feed hold with the option turned on. I switch to Handwheel mode and move to a position. Change inserts... whatever... But what happens in the background is the control, stores all modal codes and positions. Tool offset, work offset and last stored position. Once done you place back into Auto Mode and press cycle start. The Z axis will retract to safe position, XYABC will return to original positions and then the Z will feed to last known position with offsets intact and begin running from where the program left off.
This can be done but will be a challenge. And would be main line IMO.
Let me wrap my brain around how.
Don San
Please Log in to join the conversation.
JT
Please Log in to join the conversation.
I tried to isolate the issue but for the life of me cannot so it must be deeper than a surface sweep of the machine_actions.py level.
Please Log in to join the conversation.
Please help me create a subroutines return for the SubCallbButton button, if possible, I will be very grateful.hottabich wrote: Thanks, it works. and how would you react to this addition:
Sergey Sanych wrote (a):
That is, I stopped the machine, say, to clean the cutter - the chips were wound. He brought him out of the working area, did everything that was needed.
1stop the program
2 remember the location of the instrument
2.1 for such purposes, I usually use the command to remember the place where the program stopped
MDI_COMMAND = G28.1
3 cube food is convenient for me to clean or even replace the cutter
4 to return to the starting position such commands
MDI_COMMAND = G53G0X [# 5161]
MDI_COMMAND = G53G0Y [# 5162]
MDI_COMMAND = G53G0Z [# 5163]
Well, then run the program with the selected line, after turning on the spindle,
for convenience, drawing the appropriate buttons on the panel.
Please Log in to join the conversation.
I will take a look at it soon. Fighting other issues currently. Sorry.
Don
Please Log in to join the conversation.
