physical start button + pause switch

More
9 years 11 months ago - 9 years 11 months ago #82929 by Todd Zuercher
I haven't been following this really closely, but perhaps you are making this more complicated than it needs to be. What happens if you follow the kiss method and do this?
Code:
net run-btn <= parport.0.pin-13-in => halui.mode.auto => halui.program.run net stop-btn <= parport.0.pin-15-in => halui.program.stop
You may also want to try it with and with out the halui.mode.auto connection.
Last edit: 9 years 11 months ago by Todd Zuercher.

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

More
9 years 11 months ago #82935 by SenorAguas
Just tried it with and without the auto part of it. It basically worked the same as what I've already got, i.e. it basically did what I wanted it to do, but with an error on the screen:

can't do that (EMC_TRAJ_SET_TELEOP_ENABLE) in auto mode with the interpreter idle

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

More
9 years 11 months ago #82945 by Todd Zuercher
This is a longshot, but you could try this
Code:
net run-btn <= parport.0.pin-13-in => halui.mode.teleop => halui.mode.auto => halui.program.run net stop-btn <= parport.0.pin-15-in => halui.program.stop

But I'm not sure this is the real source of the problem. I'll try a few things in a simulation tomorrow.

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

More
9 years 11 months ago - 9 years 11 months ago #82964 by Todd Zuercher
This doesn't give the alarm, but I don't think it should be necessary on a Cartesian machine that doesn't have a joint mode. (seems a little bug like to me.)
Code:
setp halui.mode.teleop 1 net run-btn <= parport.0.pin-13-in => halui.mode.auto => halui.program.run net stop-btn <= parport.0.pin-15-in => halui.program.stop

The more complecated examples you were grabbing code from (with all the ands, ors...) I believe were trying to make one button do multiple tasks. Such as one button that pressing it when the machine is idle starts a file, press again pauses it, and press again resumes. Which is perfectly fine, just a little harder to configure, getting all the logic and hal commands right. At least this might get you started with something that works.
Last edit: 9 years 11 months ago by Todd Zuercher.
The following user(s) said Thank You: SenorAguas

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

More
9 years 11 months ago #83010 by SenorAguas
Thanks for the try, but it still gave me the alarm. :(

Also, as far as making the code simple, I made a mistake when I said that your simplified code was doing what I wanted it to do. I didn't test it enough. I want the stop switch to keep the program from running, and to stop it if it is already running. To do that, I think I need the and2's and or2's. This stop switch is actually a switch to tell the machine if a part is loaded. The machine glues and UV cures parts, and I dont want it to run if there is no part loaded or if the operator decides to pull it out.

I tried adding the "setp halui.mode.teleop 1" to my more complicated code. It didn't prevent the error message, but I may need to add it into the logic and not just on its own line?

Also, my code stops the program but when you hit restart, it goes to the previous line in the g code. I would like it to re-start from the beginning of the program. This is something else that I missed due to running an extremely short test program. Is there a way to force it to restart from the beginning?

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

More
9 years 10 months ago #83722 by an92626
did anyone every solve the problem with the error message "can't do that (EMC_TRAJ_SET_TELEOP_ENABLE) in auto mode with the interpreter idle" appearing when one trys to stop the program using halui.program.stop. I figured out what th actual problem is, but I do not know how to solve it.

The error message "can't do that (EMC_TRAJ_SET_TELEOP_ENABLE) in auto mode with the interpreter idle" will appear if you stop the program using halui.program.stop and the program is doing an interpolated move using two axes. If the halui.program.stop command is used while the machine is moving only one axis, there is no error message. If one stops the nc program during an interpolated move using the soft key on the gui, there is no error, so there should be a way to do this. Would it be possible to dig into the gui code that sets up the XIS gui to see how the software key works? If so, does anyone know where this code would be?

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

Time to create page: 0.333 seconds
Powered by Kunena Forum