New circuit problem

An area for asking questions, making suggestion, share ideas and place circuit examples.
Post Reply
Marcop
Posts: 4
Joined: Sat Feb 02, 2019 9:44 am

New circuit problem

Post by Marcop »

Hi,
I'm a new user and I have a problem to solve.
I have created a new counter by modifying the counter "cnt" of the Digital Clock example in the program.
When I try to use it in a project in which I need both counters, I can not do it: in the circuit where the original counter should be present, the one I modify is shown. The two counters together in the same project cannot coexist. Why? Do I have to save my counter in some different way?
Thanks for the help you want to give me
User avatar
admin
Site Admin
Posts: 407
Joined: Sun Jun 14, 2009 10:53 pm
Contact:

Re: New circuit problem

Post by admin »

Can you please share your project here, so I can look what is wrong?
Thanks,
Eugene
Marcop
Posts: 4
Joined: Sat Feb 02, 2019 9:44 am

Re: New circuit problem

Post by Marcop »

The "Conta" circuit is the one I created by modifying the original "Cnt" taken from the "Digital Clock" project.
In the same project the two counters can not coexist. When I insert one already containing the other, the latter changes.
I attached the two counters.
Thanks
Attachments
cnt_in_Digital_clock.CircuitProject
(66.47 KiB) Downloaded 312 times
ConT_mio.CircuitProject
(217.96 KiB) Downloaded 356 times
User avatar
admin
Site Admin
Posts: 407
Joined: Sun Jun 14, 2009 10:53 pm
Contact:

Re: New circuit problem

Post by admin »

Looks like you have lost connection to all your counters from the clock input C1.
Another problem is you have connected outputs of or gates with outputs of some other circuits. I've put notes in the circuit about it.
Hope it helps,
Eugene
Attachments
ConT_mio_Fixed.CircuitProject
(226.46 KiB) Downloaded 299 times
Marcop
Posts: 4
Joined: Sat Feb 02, 2019 9:44 am

Re: New circuit problem

Post by Marcop »

Thanks for the answer, but the problem is not in the circuit of my counter, he works well, as you can see in the attached sketch. The problem is, as I said, in the coexistence of the two counters in the same project. If, for example, you open the project containing the counter "Conta" and import from another project (or copy and paste) the counter "Cnt", the latter becomes the counter "Conta" and vice versa . You can try it and you can see the problem. It seems that the software considers the two counters (which are one derived from the other), when they are in the same project, the same circuit.
Attachments
ConT_mio.CircuitProject
(224.09 KiB) Downloaded 313 times
fjames
Posts: 10
Joined: Sun Jan 20, 2019 7:22 am

Re: New circuit problem

Post by fjames »

The following is wordy and I hate it, but I don't know of another way to explain it. Also I may not completely understand the problem and this explanation will be totally wrong. If that's the case then I or the moderator can just delete it. Here it goes:

If I'm understanding the issue you're trying to convey then I've ran into this problem too. I think you running into a circuit naming/version conflict. At least when it comes to importing.

If you create CircuitA and then import that circuit into Project1 all works as expected. While working on Project1 you make a change to CircuitA and save that change with Project1. Still no problems. The changes made to CircuitA WERE NOT SAVED to the original CircuitA file, but to Project1 only.

Now you create a new Project2 and import the original CircuitA. No problems here either.

Next you import circuits from Project1 into Project2, which use CircuitA, you can't import CircuitA because it already exist, same name, in Project2. But you can import the rest of the circuits. Shouldn't be a problem. CircuitA is CircuitA, right? Importing circuits that need CircuitA just use the exiting version already in Project2.

This is where it goes wrong. Project2 has a copy of the original CircuitA which does not contain any of the modifications made in Project1. When you look at the circuit in Project2 that's using CircuitA it's there but not working or maybe not working as expected. This is because CircuitA is not the modified version from Project1. The circuits from Project1 need the modified version.

Possible Solutions:
1. Delete CircuitA from Project2 and import the modified version from Project1.
2. Create 2 versions of CircuitA with different names. CircuitA and CircuitA1 for example. When you modify imported circuits change their name so you can import both versions.
3. Modify the original CircuitA so you don't run into the problem again.

Hope this is helpful
User avatar
admin
Site Admin
Posts: 407
Joined: Sun Jun 14, 2009 10:53 pm
Contact:

Re: New circuit problem

Post by admin »

I am not sure what exactly you mean by coexist. Can you explain what you expect vs wat you see?
If the issue in import, then the explanation above is almost right. When you import a circuit, it is identified by some internal ID. If you modify it and import again it will not get imported for the second time.
Marcop
Posts: 4
Joined: Sat Feb 02, 2019 9:44 am

Re: New circuit problem

Post by Marcop »

Hello,
Thank you for your efforts to understand my problem, but I think that neither fjames nor Eugene have, by my fault, understood what exactly I meant. I will try, along the lines of the explanation of fjames, to better clarify what I have done.
I took the CircuitA from Project1, I imported it into a Project2, edited it, renamed it to CircuitB and saved Project2. So I had Project1 containing the CircuitA and the Project2 containing the CircuitB. I could work on the two Project separately, adding more circuits and both the CircuitA and CircuitB worked perfectly.
Now I needed to use both the CircuitA and CircuitB together in a new Project3. I imported the CircuitA into Project3 and then imported the CircuitB. At this point the problem arose: Circuit B in Project3 was transformed into Circuit A. If I inverted the sequence of imports, ie I first imported the CircuitB and then the CircuitA, it was the CircuitA that was transformed into the CircuitB. You can try to verify what I said using the sketches that I attached earlier: it is sufficient that you copy the circuit from one project and paste it into the other.
I hope I have been clearer.
Thank you for your patience and cooperation.
Marco
User avatar
admin
Site Admin
Posts: 407
Joined: Sun Jun 14, 2009 10:53 pm
Contact:

Re: New circuit problem

Post by admin »

Hi Marco,
With all the steps now it clearer what you mean.
So, when you import the components from one file to another it’s imported with internal ID. This internal ID then checks in the next import, and if it’s already exists in the target project it’s skipped.
So, when you import and modify the import thinks that you don’t need to import it anyway.
You can import, create a new circuit and copy/paste imported component to the new one and delete the imported one. This way your new component will have new ID and will not interfere with your subsequent imports.
Hope this helps,
Eugene
Post Reply