Relay logic simulation

Hi all,

We've been asked to design a number of control / protection schemes lately which are increasing in complexity. Can anyone point us towards a simple software tool to model the relay logic we can use to sense-check the design (after a manual check of course) and highlight any faux pas before things get built? Really just to look at checking relays in series/parallel etc are doing the right thing, not a full-on circuit emulation, i.e., with these inputs changing to this state, we get these outputs live with that happening after the programmed delay and so on.

In an ideal world it would be able to read a design straight out of our CAD (ACE), but I suspect that's too much to ask!

Ta,

Jam

  • It's just a nested set of IF, Else IF statements. 

    And it's easy to debug, you just issue Serial.print statements before you connect any hardware, that's how I typically build these. 

  • Thanks all. I've had a brief look at LTspice and Multi-sim, and will have a go but as Andy suggested it feels a little too detailed, which will be interesting but might make getting things done more complicated and hence prone to errors (case in point neither seem to have multi-pole relays out of the box!)

    On the other hand nothing is ever easy so perhaps I just need to invest the time into learning one of these tools.

    Thanks again.

  • except it isn't quite - nested ifs do not correctly chatter like relays that disconnect their own suppies. There is a reason for time domain analysis ... and why it re-solves all  node voltages at every step.
    Mike

  • But the sequence of those statements has to be correct, which begs the question of how do you know what that sequence needs to be. Of course you can emulate a relay circuit in software, but to do so you need to analyse the relay circuit so that you know how it will behave for any given combination of inputs in any sequence (remembering not just that inputs could occur simultaneously or at fractionally different times, but also that you need to consider the delays introduced by each relay, and therefore the length of each relay logic path). Once you've analysed it you can implement it - but then you don't need to simulate it any more because you've already analysed it, which is what the simulator is needed for in the first place.

    The reason I get involved with this is that I occasionally have to do Independent Safety Assessment of rail signalling designs which are exactly that: software implementations of standard (and well proven) relay circuits. So I have to ask the question of how the designers know that their software exactly implements the relay logic for all possible input combinations including timings. It's not rocket science, but also not always obvious. Hence I can totally see the value of a simulation tool - I (and the software designers) could have done with one a few times!

    Cheers,

    Andy

  • There is also TINA.

    I'm using quite an old version of it, but it definitely had (modular) relays in it and I have used it to test out ideas and designs for railway signaling systems based on relay logic. I created quite complex circuits and it hasn't failed on me (yet). There is some problem with delay simulation though, but it's scriptable and you can modify the relays to do that, but it's not going to be easy.

    There are some spice formats that the software can eat, so it's not impossible to find a good relay simulation and put it in, although I haven't tried that yet.

  • I can only - suggest - the consideration of - Requirenents - Analysis - Design - Test - but the Specifics are in the Field of your Project - ? - I hope that helps in some way - ?

  • Have a look at Ladder Logic. I use expensive Siemens software for PLCs but there are free ladder logic programs and even websites app.plcsimulator.online/

  • You can use Porteous.