We allow 'stacking' of MDI commands - is it OK ???

More
2 years 9 months ago - 2 years 9 months ago #289687 by snowgoer540
LinuxCNC is based on The NIST RS274NGC Interpreter.

From section 1.3.2.1 (of Version 3):

In the EMC system, the Interpreter is used both to interpret NC programs from files and to interpret individual commands entered using the manual data input (MDI) capability of the control system. When running an NC program from a file, the driver tells the Interpreter when to read another line of code from the program file. When using MDI input, the driver sends the Interpreter a line of code to read that the controller has received from its user interface. Either way, the Interpreter reads the line and tells the driver if the line was readable. If so, the driver tells the Interpreter to execute the line.



It's also notes a distinction between keyboard (MDI) and file (batch) modes:

The SAI has two input modes: keyboard (MDI) mode and file (batch) mode. In the MDI mode, the user types lines of RS274/NGC code at the  keyboard. In the batch mode, the Interpreter reads lines of code from a file.



That being said, at the end of the day, these are ultimately choices made by those who created the existing GUIs.  There's no reason you couldn't design a GUI that doesn't allow MDI command stacking, or one that behaves like Fanuc and uses the MDI to create a g-code program line by line and then only allow running it via Cycle Start (although for this particular one, I would argue for the use of a simple text editor instead).  Or even one that doesn't support jogging via the keyboard.

It's also open source, so one could also fork the project and tweak the existing GUIs to your liking.  :)
Last edit: 2 years 9 months ago by snowgoer540. Reason: added smiley to make sure it's taken as light hearted :)
The following user(s) said Thank You: zz912, spumco

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

More
2 years 9 months ago #289690 by spumco

 There's no reason...

 


Um...  Perhaps a more accurate statement would be "There's no external impediment..." as my lack of competence is a very big reason.image missing /media/kunena/emoticons/smile.png

 
The following user(s) said Thank You: snowgoer540

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

More
2 years 9 months ago #289691 by zz912
To snowgoer540:

Would you like me to move this to a general discussion Index?

This depends on whether the MDI widget uses more GUI than Gmoccapy. If yes, please move. I didn't know exactly where to put this thread. I also considered the GladeVCP topic, but I don't know if the MDI widget is made in glade.

Perhaps I'm confused though. One such source of confusion from the other thread is where you pointed out thatc.mdi("G1 X10 Y20 Z30 F200")
andc.mdi("G1 X10 F200")
c.wait_complete()
c.mdi("G1 Y20")
c.wait_complete()
c.mdi("G1 Z30")
give different paths to the same point as if it's a problem. The first is a one line 3 axis move. The other is three lines each containing a one axis move. That's standard behavior.

I know, that it is not problem. I tried explain how wait_complete() works. I wanted to explain my previous question in a way that everyone can understand. I guess it didn't work :-( I have a lot of ideas in my head to improve LCNC, unfortunately I don't have the computer skills to do it. If I were a rentier and I didn't have to go to work, I would study programming at university. So that I can realize my ideas in Pull Requests. My posts often have a higher logic that I can't easily explain.

Otherwise, I'm glad you wrote your opinion about stacking.
The following user(s) said Thank You: snowgoer540

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

More
2 years 9 months ago #289692 by jst
I also think that this is wrong.

On Heidenhain controllers, the MDI programm/histroy is a normel programm that you can edit and copy and so on, but in MDI mode it is only possible to run one line.
The following user(s) said Thank You: zz912

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

More
2 years 9 months ago - 2 years 9 months ago #289694 by spumco
@snowgoer540 - 

Your earlier response prompted me to read the NIST rs274 document, and both it and LCNC's manual have this to say:

(rs274 v3 - 3.6.1)
Code:
Note: It is OK to program M0 and M1 in MDI mode, but the effect will probably not be noticeable, because normal behavior in MDI mode is to stop after each line of input anyway.

Does this jibe with your understanding of how MDI is working?  The NIST document doesn't discuss external python commands, of course.

 
Last edit: 2 years 9 months ago by spumco.
The following user(s) said Thank You: zz912

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

More
2 years 9 months ago - 2 years 9 months ago #289709 by blazini36
Removing MDI stacking from Gmoccapy might be wise but there's a reason it's allowed in LinuxCNC. Unless something's changed the only way to push external Gcode into LinuxCNC is MDI. You can sometimes incorperate blending with some lookahead when the commands come in stacked but it seems somewhat arbitrary.

Iforce2d made a gcode server aimed at having commands pumped into LinuxCNC via OpenPnP, similar to how 3D printers work. Linuxcncrsh was the basis for it but that seems to be a forgotten interface these days. If I had to guess I assume the "stacking" was an attempt to accomodate drip feeding via linuxcncrsh but since people tend to ignore that interface exists some of the functions may not regard it.

Personally I think the MDI stacking should be expanded to be more consistent in  LinuxCNC itself. Stacking might not be preferable in common UI's but the UI should handle feeding the commands one by one if that's the case.
Last edit: 2 years 9 months ago by blazini36.
The following user(s) said Thank You: snowgoer540, spumco

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

Moderators: newbynobi, HansU
Time to create page: 0.414 seconds
Powered by Kunena Forum