1 (edited by unalcalde 2017-02-15 16:38:32)

Topic: Ideas to solve Terminal Blocks creation

Hi, I'm Raul, the author of the Terminal Block Plugin.

I'm thinking how to solve the bornier problem. The next picture show in 3 different colors, 3 differents situacions where the same element in the scheme represents differents real situations.

I'm thinking how to solve the problem to improve the plugin in later apply the solution inside QET.

I thougth to use the "designation" field to specify which screw represent every element in the schema. The script will check of 'terminal' type elements and checks it's "designation" field. According the info will draw the correct teminal block.

I don't used to use other electricical drawing software, so I dont't know how they solve this problem.

Post's attachments

sample.png, 82.87 kb, 1050 x 720
sample.png 82.87 kb, 1639 downloads since 2017-02-15 

Re: Ideas to solve Terminal Blocks creation

Possible solution for terminals connected to a common potential (bridge). You can specify the side where  the cable connected.

Post's attachments

Seleccion_855.jpg, 74.74 kb, 638 x 559
Seleccion_855.jpg 74.74 kb, 696 downloads since 2017-02-15 

3 (edited by unalcalde 2017-02-15 16:28:21)

Re: Ideas to solve Terminal Blocks creation

Solution for terminals the represents every connected cable (with the same conductor name or not).
You can specify the order of connected. 
1,2 represents the  'black' cabled is connected on upper side and the cable 012 to the bottom
2,1: 'black' connected bottom and 012 up.

Post's attachments

Seleccion_856.jpg, 77.06 kb, 669 x 553
Seleccion_856.jpg 77.06 kb, 666 downloads since 2017-02-15 

Re: Ideas to solve Terminal Blocks creation

Sometimes I need to represent terminal blocks like this :
And I think is dificult for scripting it or find idea to solve it without working on Terninal Block function in the inside QET code, in the future.

https://download.qelectrotech.org/qet/forum_img/terminal1.png
https://download.qelectrotech.org/qet/forum_img/terminal2.png
https://download.qelectrotech.org/qet/forum_img/terminal3.png
https://download.qelectrotech.org/qet/forum_img/terminal4.png

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

5 (edited by unalcalde 2017-02-15 22:09:50)

Re: Ideas to solve Terminal Blocks creation

There is an option: count how many conductors have the same voltage. The total amount, will be assigned alternative to the Top and Bottom side in the terminal block.

To know how voltages need to count, there must be a minimum one terminal used for this voltage. The terminal block will be the sum of explicit + implicit terminals.

Re: Ideas to solve Terminal Blocks creation

I think we should propose several scenarios on the Terminal Block Plugin config, users can choose the best solution depending on the case.

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: Ideas to solve Terminal Blocks creation

Désolé, je vais m'exprimer en français ...
N'est-il pas plus simple, d'exploiter l'orientation nord/sud de l'élément ?
Nord = upper side
Sud= bottom
et de trouver une représentation de la borne qui laisse apparaître le côté armoire/nord, genre une borne supplémentaire qui est invisible à l'impression ou un "marqueur" spécial. A l'utilisateur de bien orienter l’élément lors de la pose....

Re: Ideas to solve Terminal Blocks creation

"designation input field" can be I think for me a better solution for user choose where draw each bridge with the automatic Terminal block generator.

@Galexis I can't see how to make it when you have different bridges on first and second screws ?

I don't have here examples with drawings with this bridges in upstream and downstream on terminal block.

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: Ideas to solve Terminal Blocks creation

For the present, I think the idea of Unalcalde is not a bad thing.
But for the future it would be much better if the "element properties" widget is especially dedicated for element of type "terminal". I mean without a workaround like: "use the field annotation to enter another type of data".
This way it would be easier for the user to know how to configure each terminal.

@ Unalcalde:
are you able to create a dedicated "terminal properties" widget in C++?

@ Galexis:
to differenciate the upper from the bottom screw, we could draw the symbol like this:
https://download.qelectrotech.org/qet/forum_img/nuri_terminal.png
where the the white arrow always show the "bottom screw", as convention.
Of course the element of type "terminal" must be extended with new functionalities so that QET knows what is the upper screw and what is the bottom screw.

10 (edited by unalcalde 2017-02-17 14:40:50)

Re: Ideas to solve Terminal Blocks creation

@Nuri:
Not for now. First I could study the source code of QET with the purpose of understand it. For me will be easy to solve with the pluging, and when works for all scenarios, we'll do inside QET.

A list for all scenarios using terminals:
* one element on the schema represents NORD and SUD
* one element on the schema represents a voltage and doesn't specify at what side of the terminal is connected
* one element on the schema represents a voltage and specify at what side of the terminal is connected
* several conductors with same name (voltage), and at least  one of them is connected to a terminal.

11 (edited by unalcalde 2017-02-19 21:23:11)

Re: Ideas to solve Terminal Blocks creation

Here is a screenshot of the result for the new script termianl block creation.

The red and blue terminals are correct processed. Fer every terminal is respected the number pole where the schema defines the connection. Every standart terminal have 2 poles (1 for the north side or 2 for the south side).

Note than now every cable of the terminal block haves a xreference.

The scripts also search for implicit connections (in green). Search conductors that have the same ''num" that any terminal and checks that its terminal_id_1 and terminal_id_2 are no connected to a terminal element. If not, is added to the terminal block. The problem is that the coordinates x and y of the conductor are peculiar. The implicit connectios ends by '#' in the terminal block.

¿Do you know how should I interpret the coord for conductors?

Post's attachments

004.png, 89.52 kb, 1092 x 748
004.png 89.52 kb, 1039 downloads since 2017-02-19 

Re: Ideas to solve Terminal Blocks creation

Hi Unalcalde,

I saw quickly, but I think upstream and downstream screws are mixed, no?
You could add numbering into conductors in your diagram and draw your cables in Block terminal?

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

13 (edited by unalcalde 2017-02-20 13:43:17)

Re: Ideas to solve Terminal Blocks creation

@[size=3][font=Verdana, Helvetica, Arial, sans-serif]scorpio810[/font]
If you have a cable with severals wires, it's better to connect all of his wires to the same side of the terminal block: NORTH or SOUTH.




I changed the script, and now are considered implicit connection to a terminal block, conductors that:
  * one of its connections is to a "next_report" element (like 'next_folio' or 'previous_folio".
  * are not conductors connected to a terminal element (because was tracted as explicit)
  * is required that this voltage have at least one terminal element.

The image shows all posible combinations:
  * explicit terminals with blank in its 'designation' field
  * explicit terminals where we force side (1=north, 2=south) at its 'designation' field
  * terminals that are in the middle of a conductor (designation = 1,2 or 2,1)
  * implicit connections

For implicit conection, at the terminal block, appears the xref for the conductor side not connected to "next_folio" element.

We showld test the script, and when it works, we've the algortim that solve the problem, and will be easy to implement at QET. Can you give me some QET project to I check the script?

Post's attachments

005.png, 119.56 kb, 1200 x 813
005.png 119.56 kb, 813 downloads since 2017-02-20 

Re: Ideas to solve Terminal Blocks creation

  Unalcalde
 
The problem lies in the element editor.
You must give each terminal give an number of an element

In kicad they have no problems.
This is for electronic circuits.
See element editor kicad.
  It is written in c++ and wxwidgets
See kicad source on github 

I am an industrial developer technician and born in 1960

15 (edited by Nuri 2017-02-21 00:28:05)

Re: Ideas to solve Terminal Blocks creation

@ Unalcalde

I agree with Re-searcher, there are no text attached to the terminals in the element editor.
This is one of the biggest problem to generate automatic terminal strip diagrams with QET.
I think it is not possible at the moment to make something better as what your script does.

I mean these terminals:

Post's attachments

editor_terminal.png, 1018 b, 247 x 253
editor_terminal.png 1018 b, 607 downloads since 2017-02-20 

16 (edited by unalcalde 2017-02-21 00:53:33)

Re: Ideas to solve Terminal Blocks creation

I don't understand. In other software, how do you say at what terminal strip belongs every terminal?

With the actual script, specify in the "designation" field where is connected is optional. If you don't put it will use a blank space or create a new one, but if you specificy 1 or 2 it forces North or South.

If we consider that it will be only a one terminal strip, I could search for all terminals, auto numerate and modify the XML of the schema with the data. Every terminal will have the same number that cables that are connected. Later search for implicit connections.

In a future, when QET can manage teminal strips, every time you place a terminal element, appears a contextual menu to choose at wath terminal stip is connected. It will be auto numbered as you place, and if is connected to an existing voltage, respect the numeration.

In project properties, a new tab allow manage terminals strips (add, delete, view components,...).

The same solution will be applied to cables with several wires. You need to specified cables, and when you draw a connection, specify if its a new wire of a cable.

Re: Ideas to solve Terminal Blocks creation

The pictures show the behavior when:
- the are only one terminal element for every voltage
- all terminals with a default config (e.g. no data on "designation" field for terminals element)
- multi page

Post's attachments

09.png, 48.91 kb, 1059 x 729
09.png 48.91 kb, 679 downloads since 2017-02-21 

18 (edited by unalcalde 2017-02-21 02:17:52)

Re: Ideas to solve Terminal Blocks creation

(image 2)

Post's attachments

10.png, 40.07 kb, 1083 x 754
10.png 40.07 kb, 704 downloads since 2017-02-21 

Re: Ideas to solve Terminal Blocks creation

New version of QET_TB_Generator 0.6.4 is available.

Update with: sudo pip3 install --upgrade qet_tb_generator

Now there are a new TAB with helpfull information about requirements to use. This version searches for explicit and implicit connections to a Terminal Strip.  The implicit connections ends with ' · '.

Check please, to fix all problems and finally have the algoritm than solves the problem and incluide it to QET.

May be the next step will be to find the algorithm to draw a summary for CONNECTORS:

Post's attachments

12.png, 26.1 kb, 470 x 419
12.png 26.1 kb, 653 downloads since 2017-03-04 

Re: Ideas to solve Terminal Blocks creation

Thank you so much Raul ! nomicons/smile

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: Ideas to solve Terminal Blocks creation

I have test terminal module.
Xref are strong on terminal: are diffrent on the top and the bottom.
Module add some terminal with link (numbers 12, 21) but I don't know why.

Post's attachments

Capture du 2017-03-06 20-52-40.png, 63.3 kb, 882 x 401
Capture du 2017-03-06 20-52-40.png 63.3 kb, 706 downloads since 2017-03-06 

Re: Ideas to solve Terminal Blocks creation

Project file ....

Post's attachments

Attachment icon Projet_chateau_d_eau-v4.qet 984.41 kb, 900 downloads since 2017-03-06 

23 (edited by unalcalde 2017-03-11 18:22:38)

Re: Ideas to solve Terminal Blocks creation

Hi Galexys, the Xref ending by a point are found as implicits connections. Later I'll test your QET file and check why.

In previous versions, the xref refers to the terminal, and now refers to the connected element. The up and down connections depens of the orientation of the terminal in the diagram. If rotates, will change on the terminal strip.

I 've implement a "Connectors" option. In the picture, shows that drawing the red part, we obtain the connector on the green part.

Could someone recommend me a diagram software that I can check to see how it implements  "Block terminals" and "Connectors"?. I need to see some ideas to implement the algorithm yet implemented in QET.




GUIDE TO INSTALL / UPDATE
Requires python 3.5 or above.

>> First install on Linux (tested on xubuntu 16.06)
1. Check python version: python3 --version
   To intall python 3.5:
        sudo add-apt-repository ppa:fkrull/deadsnakes
        sudo apt-get update
        sudo apt-get install python3.5
        sudo rm /usr/bin/python3
        sudo ln -s /usr/bin/python3.5 /usr/bin/python3
2. check you have pip3 installed: pip3 --version.
   If not install with: sudo apt-get install python3-pip
3. Install the program: sudo pip3 install qet_tb_generator
4. Run the program: qet_tb_generator

>> Update on Linux
sudo pip3 install --upgrade qet_tb_generator

>> First install on Windows
1. Install, if required, python 3.5 or above
2. pip install qet_generator

>> Update on Windows
python -m pip install --upgrade qet_tb_generator

Post's attachments

13.png, 59.97 kb, 983 x 638
13.png 59.97 kb, 2519 downloads since 2017-03-11 

24 (edited by unalcalde 2017-03-12 10:23:43)

Re: Ideas to solve Terminal Blocks creation

@Galexis: Check the help tab of the pluging. It explains how the terminal strip is created. 
In short, searches first for terminal elements, and later check conductors with the same number that are considered implicit connections.

I generated again the terminal strip for your project and differs. Check please the last versión of the plugin.

Post's attachments

sm.png, 71.77 kb, 670 x 770
sm.png 71.77 kb, 590 downloads since 2017-03-12 

Re: Ideas to solve Terminal Blocks creation

My problem is: it's an english help !

There is some special property for terminal element, qet's team could had to help you, and user of course ?