Sign in to follow this  
Followers 0
phoenixNature

BECKOFF - TWINCAT 3 - PLCTAsk Hardware Interrupt task call(with certain delay)

3 posts in this topic

What's purpose of the FAST INPUT MODULE EL1202 | 2-channel digital input terminal 24 V DC, TON/TOFF 1 µs 

If the maximum PLC Cycle is 50 µs  and there is no option hardware interrupt.

 

I've been working more than 5 years with SIEMENS PLC-s. Last year we have started working with BECKOFF PLC-s. At the moment I got CX2030 PLC CPU with myself.

I will try to describe following problem which I have to resolve with Beckoff PLCs.

I have to control 6 thyristors with PLC. Therefore I got CX2030 PLC,  EL3783 card – for 3 phase Voltage/Current measurement, 3 PWM OUTPUT Modules(EL2502) and 3 High Speed Fast Input modules

Once PLC realize from EL3783 card Voltage zerodetected(zerocrossing) , PWM output turn on its output(lets say DQ0.0)  for the next 60° or 3.3ms.

Sending only one rising edge inside 60° is not enough for thyristor control. So my task is to send couple of rising edges(lets say 10 rising edges would be enough) to the thyristor inside  60° or 3.3ms.

The way I've been doing this for over a 3 years inside SIEMENS PLC is the following:

 

Once there is rising edge of the PWM output turn on its output(lets say Q0.0) , I wire it to the HIGH SPEED INPUT MODULE(lets say DI0.0).

DI0.0 CALLS OB(ORGANISATION BLOCK) by HARDWARE INTERRUPT(interrupt is triggered by receiving signal on DI0.0 from DQ0.0) with certain delay. Inside OB called from Hardware INTERRUPT I'm „cutting“ output DQ0.0.

 

No matter did you understand my Idea, in order to realize this from Beckoff PLC I need option HARDWARE INTERRUPT, that means to call PLCTask on certain Digital input. So far I have found option „cycle task call“. But for me it is neccessary to call Task once I register certain Digital Input rising edge. How to make this inside Twincat 3?

Share this post


Link to post
Share on other sites

As far as I know, TwinCAT doesn't support hardware interrupt. I think you can use an oversampling digital output such as EL2262 to generate 10 rising edges in a very short time because this kind of card can generate outputs in a shorter time than cycle time and some how it is independent from PLC cycle .

Share this post


Link to post
Share on other sites

"Hardware interrupts" is called "Event" in codesys.

Anyway, you can achieve a correct control of something slightly faster than your main cycle time, using some periodic task (not freewheel). Be carrefull about the length of the computing in it by adding a proper watchdog.

Also remember that in codesys, Ouputs refresh is done by a task, so plug your fast periodic task to your output refreshing task parameter.

Last but not least, controling something way faster than your PLC cycle time should be done with some interface (some modules may convert an analogic signal properly to drive a thyristors)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0