LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

simulator logic

Hello,

I want to make a simulator like attachment. I created gates on block diagram. also I did icon for all gates. but I don't know how can I put this icons to front panel. and other programming language I use  panel, canvas etc. But I don't know what can I use in labview.  

0 Kudos
Message 1 of 11
(4,328 Views)

You might be able to use a Picture Ring control.  However, it is not clear how you would wire it up.  You could use something like a netlist, but that is not very uesr-friendly.

 

Lynn

0 Kudos
Message 2 of 11
(4,292 Views)

Hello!

 

If you right click on the block diagram, the functions palette should appear. Select programming >> boolean, and you will see AND, OR, EXCLUSIVE OR, etc. functions. Because these functions are not controls or indicators, they will not appear on the front panel as they are simply doing work in the back ground. 

 

Boolean Palette

 

You may find some helpful information with LabVIEW here.

 

Katie

Katie Collette
National Instruments
Message 3 of 11
(4,291 Views)

Hello, Thanks for your answers.

 

but I didn't explain you exactly.I'm sorry. I know that how can I build a logic using labview. 

 

But I mean, I want to create a logic simulator using labview. This is my project. I created  icons for all gates and I edited icons for them. I can see points for wiring on block diagram. but I want to see this icons on front panel  (at the attachment  you can see icon and its points for wiring on block diagram). I don't know how can I move this icons to front panel as block diagram??

0 Kudos
Message 4 of 11
(4,260 Views)

You can drag png files of the icons on the front panel and use the lines in the decoration panel to connect things together.  It will just be a picture and have no functionality, but you would be able to visualize your logic.

0 Kudos
Message 5 of 11
(4,241 Views)

Hello Katie,

I wanna wonder that, can I define "and gate" as an object? is it possible?

if I can define as an object so can I drag drop that image? can I wire with other gates which I want?

 

0 Kudos
Message 6 of 11
(4,206 Views)

What kind of "object"?

 

Can you give us a simple example of what you want your program to do?  There has been a lot of guessing. Please describe what a user would do with your program, step by step, and what the program output would be after the user does these things.

 

Lynn

0 Kudos
Message 7 of 11
(4,187 Views)

 

I want to build a logic circuit simulator. User interface will be at attachment(logicsimulator.jpg, logicsimulator2).

User drag drop logic circuit images into the editor. Then draw connections between them. Simulator run in real time. This is my project. But I tried to do it. Bu I didn't 😞

 

So I thought maybe I should think as c# programming language. We define objects, class in c#. A gates is defined an object in c#. But in labview how I give functionality to that images(logicgates.jpg)? I don't have any idea. 😞 

 

And connections: I found examples but that example use just one picture box then draw lines but those lines have no functionality. For example, if connections wire wrong so it will give an error otherwise its color will be red.

 

 

 

 

Download All
0 Kudos
Message 8 of 11
(4,169 Views)

This will be pretty hard to implement in LabVIEW. That being said, you can consider using a case structure to build your logic functionality. You can send a boolean into the case selection, which if it's true, does one thing, and if false, does another. These cases can contain property nodes to change colors of various objects (such as your wires) depending on the case.

 

A little more about property nodes: http://zone.ni.com/reference/en-XX/help/371361H-01/glang/property_node/

Ravi A.
National Instruments | Applications Engineer
0 Kudos
Message 9 of 11
(4,147 Views)

I have a half-baked idea, but before I present it, I would like to ask a few more questions.

 

How many different types of logic devices do you need to simulate?  One of your images shows 8 gate types.  Is that all you need to do?

 

What is the maximum number of devices you need to simulate in one circuit?

 

What is the purpose of the simulator? Just to show that it can be done? A classroom exercise? A logic circuit design tool?

 

Will you be assuming pure logic or trying to simulate real effects like finite drive, delays, noise, ???

 

Lynn

 

0 Kudos
Message 10 of 11
(4,131 Views)