[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: Interpreter for automation schematics



   Hello again!
   After reading mr. Dotys tutorial on guile scripting, I decided that
   this was the way to go.
   A few questions:
   I would prefer to run scripts from gschem directly. But I cant find a
   way to output text. This makes the learning curve a lot steeper.
   I tried starting gschem from BASH and executed this script on my
   schematic:
   (define (test2)
       (display "work dammit!")
       (newline)
   )
   But i cant see any text either in the log window or terminal. It would
   help to know what's going on in there.
   It would also help to know what arguments are passed to the script when
   executed from gschem. I noticed that gnetlist passes only the output
   filename, and stores everything else in globals.
   The scripts auto-uref and auto-place-attributes seems to accept
   something like an array of attributes, but my understanding of guile
   and gschem is still to low to grasp this.
   Thanks
   //John
   On 03/29/2011 04:53 PM, John Erlandsson wrote:

   There are a few attributes left from my awk attempts.
   I used crossref-ms-no to keep track of how many subsymbols where
   related to that specific symbol.
   When the script found a coil, say K1. It went in to a loop browsing for
   subsymbols with the same refdes. When one was found it changed its
   crossref attribute and stored its coordinates.
   The coordinate ranges was hardcoded in a function that translated them
   somewhat randomly to "letter and number". I guess that a "prefer left"
   strategy would be better.
   Hidden attributes is a good idea for portability.
   The idea with the cross-reference labels, was to only allow two with
   the same name. Since I label all of the wires on my panels with unique
   numbers. Your suggestion is better, more readable and less typing.
   I am currently looking at the examples you suggested. Trying to break
   them down to read/write attributes. But I need to study guile a lot
   harder.
   Thanks for helping.
   //John
   On 03/29/2011 04:11 PM, Peter Clifton wrote:

     Thanks..
What does the attribute crossref-ms-no mean? Is that how the contacts of
a contactor can refer back to the location of the coil? Obviously each
piece which is cross-reference-able needs to be identifiable, so the
correct location is discovered.

With regards the location cross-references labels, such as XR1, what
happens if there are more than two locations? Is it only allowed that
two exist?

For producing correct electrical netlists, it is important that you
assign the same netname to each object. I "think" this will work the way
you have drawn, but it deviates quite a lot from what is "normal
practice" in gEDA.

Usually (when drawing schematics for PCBs / simulations), we label nets
with a "netname=..." attribute, or (sometimes), to use a flag symbol
like you have, with no refdes= attribute, but instead give it a
"net=foo:1" (connecting net "foo" to the whatever is attached to pin 1
of the flag symbol).

In order to implement this generically, I imagine your title block could
be given some hidden attributes which describe the coordinate ranges
inside it which correspond to different grid coordinates.

Additionally.. what happens if an item being cross-references spans
multiple grid coordinates? Can the choice be random, or does it need to
be the one with most of the symbol in it - or top-left one, or some
other rule?






_______________________________________________
geda-user mailing list
[[1]1]geda-user@xxxxxxxxxxxxxx
[2][2]http://www.seul.org/cgi-bin/mailman/listinfo/geda-user

References

   1. [3]mailto:geda-user@xxxxxxxxxxxxxx
   2. [4]http://www.seul.org/cgi-bin/mailman/listinfo/geda-user





_______________________________________________
geda-user mailing list
[5]geda-user@xxxxxxxxxxxxxx
[6]http://www.seul.org/cgi-bin/mailman/listinfo/geda-user

References

   1. mailto:1]geda-user@xxxxxxxxxxxxxx
   2. http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
   3. mailto:geda-user@xxxxxxxxxxxxxx
   4. http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
   5. mailto:geda-user@xxxxxxxxxxxxxx
   6. http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
begin:vcard
fn:John Erlandsson
n:Erlandsson;John
org:Lunatech Innovations
adr;quoted-printable:;;Kabelv=C3=A4gen 5;Alstermo;;360 75;Sweden
email;internet:john@xxxxxxxxxxx
title:Chef
tel;cell:0708-617228
url:http://www.lunatech.se
version:2.1
end:vcard


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user