Switch relay in a defined x position

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 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 to join the conversation.

More
1 year 2 months ago #333287 by mgm
So, I've now tested it in a VM. 

If I leave the query in the function

if((position > stop1)&&;(position < stop2))
halt=1;
else
halt = 0;
I cannot activate the machine!
If I reverse the query, I can reference the machine and also move the axis to the position support.stop1 From this point on, the axis can no longer be moved.So far, so good! 

What I still don't understand:
- Where or with which pin is the reed sensor of the cylinder connected
  The reed sensor that tells me that the cylinder is retracted! 

Of course, this is now a simulation and on the real machine it is an input on the Mesa card, but there must be a pin to compare whether the spport.halt and reed sensor of the cylinder are the same or not? 

The motion.enable should only trigger when the two signals are different. 

So the axis is between the positions stop1 and stop2:
- If halt.motion is true and the cylinder's reed sensor is also true, the axis can continue to move- If the two signals are different,
 the axis must stop, which is what it is currently doing ...

Please Log in to join the conversation.

More
1 year 2 months ago #333363 by Benb
Let see if I grasp the concept. You have an existing reed switch that detects that the support is in extended position and you like stop all axis from moving when switch is active.
1) Wire the reed switch to your mesa digital input.
2) Load the new revised .comp file
3) You may need the change operations by changing the state of pins. for example, trigger=1; to trigger=0; same for halt and reedsw.

Attached is revised the revised spinport.comp

Please Log in to join the conversation.

More
1 year 2 months ago #333464 by mgm
Hello Benny,

That's it now... Thank you very much for your support.

The only thing I had to change was:
- motion.enable
to
- halui.estop.activate

The latest version is now attached. 

Attachment not found

Please Log in to join the conversation.

Time to create page: 0.048 seconds
Powered by Kunena Forum