element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Autodesk EAGLE
  • Products
  • More
Autodesk EAGLE
EAGLE User Support (English) ULP: write CSV file with net information
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Autodesk EAGLE to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 4 replies
  • Subscribers 180 subscribers
  • Views 686 views
  • Users 0 members are here
Related

ULP: write CSV file with net information

fohnbit
fohnbit over 8 years ago

Hello,

 

I draw with own parts and link this with net together.

Now I want to write a CSV File with this information.

 

I already have all information in the file, but have problem with the "nets"

 

A net:

Has a source and target (or more)

 

now I want to loop over all nets:

SCH.sheets(SH)

    {

SH.nets(N)
{

But now I use segments and then pinrefs.

 

But I need a loop, for each net which give me the source and target of the net.

 

Example:

image

 

Have to loop over the nets (N$2 and then N$3):

 

N$2 = source HDMI-1, target EXT-1

N$3 = source HDMI-2, target EXT-2

 

How can I reach this goal?

 

Thank you!

  • Sign in to reply
  • Cancel

Top Replies

  • fohnbit
    fohnbit over 8 years ago in reply to rachaelp +1
    Hello Rachael, thank you! I use Eagle not for electronic parts. I draw audio/video/multimedia components and their connections. I also print the labels for this parts (Matrix, Loudspeaker, Amplifier, HDMI…
Parents
  • rachaelp
    rachaelp over 8 years ago

    Hello,

     

    Warren has made a good suggestion, to give you a complete netlist of your design. If you need to go further than this to determine source/target of every net then it's an interesting idea, although to do what you are trying to do isn't perhaps as simple as it sounds.

     

    Firstly, you'll need to ensure that all your components have their pin types set correctly (a lot of 3rd party libraries wont have this information correctly configured) which is fine if you are creating all your own libraries (which you definitely should). Then you'll need to examine the pin type of each node connecting to a net to find the source, which is fine if there are obvious output and input pins but what if you have bidirectional pins? You'll need to have some way to determine what you need in this case.

     

    Secondly, when you've determined the source, that's fine for simple 1-to-1 connections, or even 1-to-many, but what happens when there are passives components which form part of an overall path? You'll need to then note which end of those is the target to another source so you can work out that their other end is a source to go to other targets. It's all doable I think, just not simple, and would likely require a lot of user input to make decisions on resolving unknowns.

     

    Could you expand on the reason you are trying to do this? It might help us find another existing way to achieve your goal.

     

    Best Regards,

     

    Rachael

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • rachaelp
    rachaelp over 8 years ago

    Hello,

     

    Warren has made a good suggestion, to give you a complete netlist of your design. If you need to go further than this to determine source/target of every net then it's an interesting idea, although to do what you are trying to do isn't perhaps as simple as it sounds.

     

    Firstly, you'll need to ensure that all your components have their pin types set correctly (a lot of 3rd party libraries wont have this information correctly configured) which is fine if you are creating all your own libraries (which you definitely should). Then you'll need to examine the pin type of each node connecting to a net to find the source, which is fine if there are obvious output and input pins but what if you have bidirectional pins? You'll need to have some way to determine what you need in this case.

     

    Secondly, when you've determined the source, that's fine for simple 1-to-1 connections, or even 1-to-many, but what happens when there are passives components which form part of an overall path? You'll need to then note which end of those is the target to another source so you can work out that their other end is a source to go to other targets. It's all doable I think, just not simple, and would likely require a lot of user input to make decisions on resolving unknowns.

     

    Could you expand on the reason you are trying to do this? It might help us find another existing way to achieve your goal.

     

    Best Regards,

     

    Rachael

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • fohnbit
    fohnbit over 8 years ago in reply to rachaelp

    Hello Rachael,

     

    thank you!

     

    I use Eagle not for electronic parts. I draw audio/video/multimedia components and their connections. I also print the labels for this parts (Matrix, Loudspeaker, Amplifier, HDMI Extender, ...) with ulp export

     

    I draw each pyhsical component (Beamer, Loudspeaker, Matrix, ...) with their inputs and outputs.

    Normaly I have only 1-to-1 connections, like:

    Ethernet

    RS232

    RS485

    Loudspeaker cable

    HDMI cable

    ...

     

    So 1-to-many I don´t use.

     

    For me, a net ist as example a HDMI cable ... this has a one start point and one end point.

     

    So each net has:

    start point (source) --------- net name ------------ end point (destination)

     

    I set up each pin:

    in

    out

    io

    pwr

     

     

    I loop now over all nets and for each net I loop again over all nets:

    In the second loop I check for:

    If same netname

    If source pin is IO or OUT

    If part name is not equal (because to remove dulpicates)

     

    SCH.sheets(SH)

    {

    SH.nets(N)

    {

    N.segments(SEG)

    {

    SEG.pinrefs(P)

    {

    cablename = N.name;

    SH.nets(N1)

    {

    N1.segments(SEG1)

    {

    SEG1.pinrefs(P1)

    {

    if(N.name == N1.name && (P.pin.direction == PIN_DIRECTION_OUT || P.pin.direction == PIN_DIRECTION_IO) && (P.part.name != P1.part.name)){

     

     

    from = P.part.name + " (" + P.part.value + ")";

    to = P1.part.name + " (" + P1.part.value + ")";

    cabletyp = N.class.name;

     

    This works in the first version :-)

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • rachaelp
    rachaelp over 8 years ago in reply to fohnbit

    Hans König wrote:

     

    I use Eagle not for electronic parts. I draw audio/video/multimedia components and their connections. I also print the labels for this parts (Matrix, Loudspeaker, Amplifier, HDMI Extender, ...) with ulp export

     

    I draw each pyhsical component (Beamer, Loudspeaker, Matrix, ...) with their inputs and outputs.

    Normaly I have only 1-to-1 connections, like:

    Ethernet

    RS232

    RS485

    Loudspeaker cable

    HDMI cable

    ...

     

    So 1-to-many I don´t use.

     

    For me, a net ist as example a HDMI cable ... this has a one start point and one end point.

     

    So each net has:

    start point (source) --------- net name ------------ end point (destination)

    I see now, that's a cool alternative use for EAGLE, I like it image

     

    Hans König wrote:

     

    I set up each pin:

    in

    out

    io

    pwr

     

     

    I loop now over all nets and for each net I loop again over all nets:

    In the second loop I check for:

    If same netname

    If source pin is IO or OUT

    If part name is not equal (because to remove dulpicates)

     

    SCH.sheets(SH)

    {

    SH.nets(N)

    {

    N.segments(SEG)

    {

    SEG.pinrefs(P)

    {

    cablename = N.name;

    SH.nets(N1)

    {

    N1.segments(SEG1)

    {

    SEG1.pinrefs(P1)

    {

    if(N.name == N1.name && (P.pin.direction == PIN_DIRECTION_OUT || P.pin.direction == PIN_DIRECTION_IO) && (P.part.name != P1.part.name)){

     

     

    from = P.part.name + " (" + P.part.value + ")";

    to = P1.part.name + " (" + P1.part.value + ")";

    cabletyp = N.class.name;

     

    This works in the first version image

    Excellent, I'm glad you managed to get it working image

     

    If you need any more help just ask, but it seems like you have this well in hand now.

     

    Best Regards,

     

    Rachael

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube