Time out on toolchange

More
10 years 6 months ago #72923 by emcPT
Time out on toolchange was created by emcPT
Hello,

In a tool change component when something goes wrong a time out is normally present on machines that indicates that the tool change went wrong.

How can a time out be accomplished inside a component ? For example if the tool change does not occur in 10 seconds it should enter in error.

Thank you

Please Log in to join the conversation.

More
10 years 6 months ago #72934 by BigJohnT
Replied by BigJohnT on topic Time out on toolchange
I do my tool change in Classicladder so timers are easy.

I think (guess) you could make a timer of some sort in a component maybe counting cycles or something. Oh take a look at the time component it tracks time.

Edit: and look at the timedelay component.

JT

Please Log in to join the conversation.

More
10 years 6 months ago #72954 by andypugh
Replied by andypugh on topic Time out on toolchange

emcPT wrote: How can a time out be accomplished inside a component ?


You mean inside a realtime HAL component?

Typically a HAL component is written as a state machine:
Code:
state = 0; switch state{ case 0: // idle if (thing) { stuff; state = 1 } case 1: // begin if (other thing){ more_stuff state = 2 ...
and so on.

To add a timeout:
Code:
state = 0; switch state{ case 0: // idle if (thing) { stuff; timer = 0; state = 1 } case 1: // begin timer += period; // period is in nS if (timer > 1000000) { state = 99; break } if (other thing){ more_stuff timer = 0 state = 2 ... case 99: // Handle timeout heree

Please Log in to join the conversation.

More
10 years 6 months ago #72968 by emcPT
Replied by emcPT on topic Time out on toolchange
Yes, we implemented like a delay (that we were using in another machines) and quite similar to your implementation and it works fine.

About the classicladder I never tested as we are able to do almost anything with components.

Please Log in to join the conversation.

Time to create page: 1.012 seconds
Powered by Kunena Forum