Author Topic: Relay Simulation Tool  (Read 2604 times)

0 Members and 1 Guest are viewing this topic.

hidden layer

  • Jr. Member
  • **
  • Posts: 28
Relay Simulation Tool
« on: October 30, 2019, 04:41:14 AM »
Hello together,
here's a .vss which contains some symbols that will work for simulating complex relay schematics. a Manual will be supplied with the next message.

The Simulation will work without vba, but there's a bit vba needed to make allocations between coil and contacts of the relays. and another script to make allocations for the Connections.

I created this (with a little big help from the guys here) because the available Simulation Tools I found (e.g. K-Relay) are very limited in Terms of amount of contacts for a single relay, amount of relays and so on.

I used Visio2010 for this.

any improvements, warnings, adaptions... are welcome!

cheers,
hl
« Last Edit: November 05, 2019, 02:49:13 AM by Visio Guy »

hidden layer

  • Jr. Member
  • **
  • Posts: 28
Re: Relay Simulation Tool
« Reply #1 on: October 30, 2019, 04:53:24 AM »
and here's the file which contains the macros.

I use this as a template and it works (at least for me) for all applications I tried out within the last 3 weeks. So it is a bit new/ immature/ bumpy but it works.

the schematic is a part of one I used for a current project but a bit anonymized. The relays shall be renamed either with 'speaking names' or with their original IDs from the schematics. lamps and switches as well.

I'll spread this around to some friends/ collegues of mine (which still may have not an account here) - we'll see if and how this will mature.

cheers,

hl
« Last Edit: November 05, 2019, 02:51:56 AM by Visio Guy »

hidden layer

  • Jr. Member
  • **
  • Posts: 28
Re: Relay Simulation Tool
« Reply #2 on: October 30, 2019, 05:20:33 AM »
i forgot:

Switches and power supplies can be toggled with double-click.

;)

hl
« Last Edit: November 05, 2019, 02:51:12 AM by Visio Guy »

Hey Ken

  • Full Member
  • ***
  • Posts: 203
  • Just This Guy
    • The Pennsylvania Project, with Ken Krawchuk
Re: Relay Simulation Tool
« Reply #3 on: October 30, 2019, 07:30:13 AM »
Hey, hl!

   Several years ago I wrote some Visio VBA to draw active schematic circuits.  It has batteries, bulbs, wires, switches and relays, and you can design and actually operate circuits.  Might give you some ideas.  (Yeah – ideas of what to avoid! ;- )  Check it out: http://visguy.com/vgforum/index.php?topic=6969.msg29130#msg29130.  Could use some improvements, but at least it works!

   - Ken

« Last Edit: November 05, 2019, 02:49:30 AM by Visio Guy »
Ken V. Krawchuk
'caster

The Pennsylvania Project
Radio Podcast

10 to 11 AM Saturdays on WWDB 860 AM in Philadelphia
On demand at http://PennsylvaniaProject.com

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3645
  • Ideas Visio-lized into solutions
Re: Relay Simulation Tool
« Reply #4 on: October 30, 2019, 08:54:59 AM »
Haven't had a chance to try this yet, nor anything like K-Relay.  But I was wondering if their limitation is just a software limitation or is it based upon availability of actual hardware?   Simulating a relay with, say, 100 contacts, would merely be an intellectual endeavor with no applicable value if no such device exists.  Just an uninformed observation.  Looking forward to trying this.

Cheers.
« Last Edit: November 05, 2019, 02:50:39 AM by Visio Guy »
Visio 2019 Pro

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2809
    • Paul Herber's website
Re: Relay Simulation Tool
« Reply #5 on: October 30, 2019, 11:48:00 AM »
« Last Edit: November 05, 2019, 02:49:36 AM by Visio Guy »
Electronic and Electrical engineering, business and software stencils and applications for Visio -

https://www.paulherber.co.uk/

hidden layer

  • Jr. Member
  • **
  • Posts: 28
Re: Relay Simulation Tool
« Reply #6 on: October 30, 2019, 11:59:27 AM »
Hi wapperdude,
in Trains there are lots of relays due to safety regulations. the Switch to activate a loco sometimes activates 10 relays with up to 6 contacts. so 50 is not seldom... ;)
I give to all of These relays the same Name - to simplify the endeavor.
What I have seen with K-Relay is that there's a limited Screen and predefined paths what is not much. for schematics in this 'size' I don't Need a Simulation ;)

Hi Ken - asap I'll check this. Thanks! currently I'm a bit below water.

Hi Paul - thanks for the link - later more!

and now for something complete different: I write with a PC with German Keyboard (and probably German spelling correction) - sorry for upper cases here and there... wtf!

Greez
hl
« Last Edit: November 05, 2019, 02:49:42 AM by Visio Guy »

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3645
  • Ideas Visio-lized into solutions
Re: Relay Simulation Tool
« Reply #7 on: October 30, 2019, 12:06:39 PM »
Played around a little bit.  Nice.  Kinda convoluted following signals around.  I assume that Master.3 is the coil?  Seems to work well and does what it's supposed to.  Who'da thought trains were so involved!

A couple of suggestions:
1) use the double click entry to bring up the shape data menu:  DOCMD(1312) and use the right click menu (Actions sections) to control the switch on/off.
2) on the NO contact, and I presume, the NC contact, the inputs and outputs are reversed.  Normally, the common terminal always has the incoming signal, and the outgoing is the switched pin.  Perhaps different in railroading world.   ;)
3) you might want to add a terminal type that has 3 contacts: common, NO, NC.  When the relay is energized, the contact switches from NC position to the NO position.  Basically a SPDT. Alternatively, just a single shape with 3 contacts.  Depending upon wiring, could be a NC, NO, or SPDT. 
« Last Edit: November 05, 2019, 02:50:29 AM by Visio Guy »
Visio 2019 Pro

hidden layer

  • Jr. Member
  • **
  • Posts: 28
Re: Relay Simulation Tool
« Reply #8 on: October 31, 2019, 02:07:37 AM »
Hi wapperdude,
thanks for the flowers!

it's not only Trains. If you have to realize something with a SafetyIntegrityLevel (0-4; 4 is Maximum - in case of malfunction many souls lost...) you can choose between PLC or relays. A PLC is much more expensive as any relay - of course these relays are more expensive than Standard ones.

actually I started with right-click to Switch ON/OFF (so there were some iterations to get this result as it is...) but then it turns out (to me) that it is more simple to realize the switching with a dblClick. Because the schematic will Change a Little bit only but I have to Show this more often to guys who insist that it works but not for me - y'know?
The shape data you have to enter only once after you dropped it. That's why it is at the menue. anyway - it's more about that I am lazy and a dblClick is much less "work" than a click, a move and another f***ing click  ;).

inverted in-and Output... maybe there's a Standard but in our schematics it's drawn like this. And the tool they work with (E3-series/ EPLAN) is not railway-specific. Maybe it's the american way - they interchanged symbold for resistors and coils (compared to German symbols) too  ;)
The real source for choosing a determinated in- and Output is something different:
There are schematics where some contact is placed in the middle of the schematic (so Pin1 have to be active if Pin2 is active AND the contact is Closed as well as the other way round). And this I haven't solved yet because there was always a circular reference. I know there's a way with Getf(GetRef(... but for the schematics I work with it was not necessary to dive that deep.

about the last Point - yes I started some minutes but then I discovered to save this time and take a NC and a NO in parallel - that's it. The amount of contacts is not limited at all.

have fun!

hl
« Last Edit: November 05, 2019, 02:50:20 AM by Visio Guy »

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3645
  • Ideas Visio-lized into solutions
Re: Relay Simulation Tool
« Reply #9 on: October 31, 2019, 09:22:49 AM »
 :D :D :D

(I have German ancestry, so this is politically OK...)  Yes, German's do things backwards....grammatically...throwing mommy from the train, a kiss, etc.  Actually, there's probably no rule for that.

You and Hey Ken should start a club...oh, wait, that would take too much effort!  LOL. 

Anyway, nicely done.
« Last Edit: November 05, 2019, 02:49:49 AM by Visio Guy »
Visio 2019 Pro

cliff50

  • Full Member
  • ***
  • Posts: 202
Re: Relay Simulation Tool
« Reply #10 on: October 31, 2019, 02:58:23 PM »
works fine , well done.  ;
Can it be made to operate relays on other pages as well as the current page ?
« Last Edit: November 05, 2019, 02:50:10 AM by Visio Guy »

hidden layer

  • Jr. Member
  • **
  • Posts: 28
Re: Relay Simulation Tool
« Reply #11 on: November 01, 2019, 04:06:29 AM »
Hi Cliff,
actually I don't know about that because I didn't take this into account. It could be possible to adapt this with master-switches and master "lamps" which are located in a 'common' area to act there and see the 'result' also there.
The cases I made this tool for is only at one page. Sometimes they are large... but it's o.k (for me).

Also the macro takes always the ActivePage to allocate wires and devices - maybe this have to be adapted as well.

so sorry for any inconvenience ;)

Hey wapperdude,
as I regard this as a technical dominated place the relation between language (and it's pitfalls) and some technical aspects we should discuss in the Humor- corner, right?
e.g. English drive on (at?) the wrong side of the road...disambiguated to the right side where the others drive... ;)

Hello Ken,
your .vsd didn't work at my PC - aside of the switches (upper left corner). then I took a look at the macros and stopped investigation there. This is a bit beyond my experience with macros in Visio.
My way to use macros at all (in Excel) was some accidentally found solution and has its reason in my laziness to do things again and again and again. And then one thing chases the other.
The thing is that I don't wanted to do this with macros if it's possible without.
Only the allocation cannot be done by formulas afaik.

have fun!
hl
« Last Edit: November 05, 2019, 02:50:03 AM by Visio Guy »

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3645
  • Ideas Visio-lized into solutions
Re: Relay Simulation Tool
« Reply #12 on: November 01, 2019, 09:43:43 AM »
Quite right...
The shapesheet doesn't have enough "power" to allow a 100%, non-code solution.  You met your goals, it works. Job done.

« Last Edit: November 05, 2019, 02:49:56 AM by Visio Guy »
Visio 2019 Pro

hidden layer

  • Jr. Member
  • **
  • Posts: 28
Re: Relay Simulation Tool
« Reply #13 on: December 04, 2019, 07:42:40 AM »
Hi there,
just another stencil with an additional NC-Switch.
Remember that the contact turns to red Color if the Switch is active, and always use the template in the 2nd post (at least the macros).

have fun
hl