Switch relay in a defined x position

More
1 year 2 months ago #332960 by mgm
Thanks for the suggestion, but I have already installed a pressure monitor with an e-stop, which is set at 4.5 bar.
Unfortunately, this did not prevent the support from breaking off, for whatever reason, I don't know.
Therefore, I would like to install an additional safety device.

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

More
1 year 2 months ago #332962 by mgm
Hello Benny,
I'm not sure if I expressed myself correctly,the file spinport.comp causes the cylinder to retract when the y-axis reaches position 900 (while processing a program or jogging), allowing the axis to pass through the support.
When the y-axis reaches position 1600, the cylinder is extended again.

I haven't changed anything on the machine yet because I'm on vacation. But after my vacation, I want to install the new spindle support quickly. I tore down the support shortly before my vacation!
   
Code:
component spinport "LinuxCNC HAL component that switches the spindle support"; description """ Component to trigger the spindle support \\fBEXAMPLE:\\fR .br .br loadrt spinport names=spport .br addf spport servo-thread .br net position axis.y.pos-cmd => spport.position .br setp spport.on 900 .br setp spport.off 1600 .br net spport-trigger spport.trigger """; author "Rod Webster"; [attachment=71242]spinport.comp[/attachment] pin in float position "Motion signal for Axis position"; pin out bit trigger "True if spinport segment should be triggered"; param rw float on "Absolute axis coordinate from which the support is retracted"; param rw float off "Absolute axis coordinate from which the support is extended"; function _; license "GPL"; ;; #include <rtapi_math.h> FUNCTION(_) { if((position > on)&&(position < off)) trigger = 0; else trigger = 1;

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

More
1 year 2 months ago #332981 by Benb
While your issue appears straightforward, I'm having difficulty grasping the logic control conditions. It would be nice if you hand draw the relevant parts of the system that might put things into prospective. And most importantly list the conditions for disabling the axis.
For example: if ((position < 900) && (position > 1600)) disable the axis (this a fictive example just for illustrations)

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

More
1 year 2 months ago - 1 year 2 months ago #333034 by mgm
Starting point after referencing the machine:
- The cylinder for spindle support is extended 

The spinport.comp component monitors the position of the axis.
- When the axis reaches position 900, the cylinder is retracted, and when the axis reaches position 1600, the cylinder is extended again.
position axis.x.pos-cmd > 900 Cylinder retracted
position axis.x.pos-cmd > 1600 Cylinder extended 

What I need now is a check to see whether the cylinder is really retracted at the axis position between 900 and 1600 so that the axis can move through!For monitoring purposes, the cylinder is equipped with a reed contact when retracted.

Another factor that must be taken into account during monitoring is that the axis travels a certain distance during the time the cylinder is moving.The spindle support is at the axis position 1250 and I am traveling at a maximum speed of 4 m/s.

After thinking about it, also with your help, all that really needs to be checked is whether the cylinder is retracted between axis positions 1000 and 1500. 

position axis.x.pos-cmd > 1000 and < 1500 ---> cylinder retracted 

I think 100 mm in both directions should be enough for the cylinder movement!?!If that is the case, everything is fine. If the cylinder is not retracted, all axes must be stopped. 

Now the only question is whether the check should be monitored in the spinport.comp file or in the HAL,and what could the code look like?  
Last edit: 1 year 2 months ago by mgm.

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

More
1 year 2 months ago #333051 by Benb
Attached is revised spinport.comp which incorporate 

position axis.y.pos-cmd > 1000 and < 1500 ---> cylinder retracted and halt any axis movement

Note your hal configuration is monitoring y-axis.

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

More
1 year 2 months ago #333139 by mgm
Thank you very much for your effort
I will try to test the revised version in my simulation.
I will report at the latest when I am back at the machine, or when I am back from vacation.
Thanks again for your work.
Greetings Michael

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

Time to create page: 0.415 seconds
Powered by Kunena Forum