Jump to content

simulation doesnt work second time.plz help


Recommended Posts

Hi,

i am attaching my spatial logic.vi.In this i have one main pump which runs five smaller pump(SP1 to SP 5) and once the tanks reach 75%,the pumps stop and the recirculating pumps open for 5 sec(SP 6).After that the volume is drained off(SV1) to Interim Storage.

The recirculating pumps work fine in the first cycle of loop,but the second time they open for a second even though i have given a time delay of 5 secs.Plz Help.

Also i am attaching my second Vi-ARC-Project Vi.As u can see both the VI's have common Interim Storage.As i am new to labview i broke the project in two VI.How do i add the volume collected from VI no 1 and VI no 2 together.

Thanks in advance..

Link to comment

>>

Hi,

i am attaching my spatial logic.vi.In this i have one main pump which runs five smaller pump(SP1 to SP 5) and once the tanks reach 75%,the pumps stop and the recirculating pumps open for 5 sec(SP 6).After that the volume is drained off(SV1) to Interim Storage.

>>

The attachment procedure did not work

>>

The recirculating pumps work fine in the first cycle of loop,but the second time they open for a second even though i have given a time delay of 5 secs.Plz Help.

>>

Without the attachement is it is impossible to answer this question.

You should investigate using the Highlight Mode (small lightbulb symbol on menu of Block Diagram) of operation which will slow down the operation and move small dots along the wires so you can see how the data is flowing as the VI operates. You can also create probes to show the values of the data as the VI operates. You need to learn these basic debugging techniques as soon as possible.

Your problem is certain to be a lack of understanding of how "data flow" programming works. LabVIEW is not a sequential language, it is a data flow language. Operations are not simply sequential - one after another. Many functions can be occuring at the same time. At what time these functions operate depends on the flow of data.

How a VI runs. You must understand this:

ALL the items on your block diagram that have no inputs (and are not inside a structure such as a loop or sequence frame) will run immediately and at the same time when the VI is run. Each one produces an output that is put on the wires that are attached to the output terminals. Then the data goes to the ends of those wires and is ready to be used by the next function of sub-VI which receives the data on input terminals.

This is important: After the intial operations - every function or subVI will run as soon as all its inputs receive data. If a function or subVI never receives all its inputs, it will never run.

Anytime you use a structure such as For Loop it is the same. All the wires that bring inputs to the structure MUST deliver the data before the structure will operate, and in the case of repeating loops, all the wires that deliver data to the output border of the structure must produce their data at the border or the loop will NEVER finish. Loops must complete an iteration to run again, and if the wires attached to the border never receive the data from inside the structure, the loop will not ever run more iterations. The outputs of a structure never send their data on to the next function until the loop has finished completely.

>>

Also i am attaching my second Vi-ARC-Project Vi.As u can see both the VI's have common Interim Storage.As i am new to labview i broke the project in two VI.How do i add the volume collected from VI no 1 and VI no 2 together.

Thanks in advance..

>>

You are missing a basic idea about VI architechture.

In LabVIEW ou can have VI's, inside VI's, inside VI's. You need a higher level VI the the two VI's you have are placed on the Block DIagram (BD) of the higher level VI.

The values you want to add are outputs of the VI's in the higher level VI. In the Higher VI you wire the valus to and addition functions and the result is available on the output of the addition function.

In order to do add you two values you will need to create "Connector Panes" for the two Vi's producing the volume values. You should look up how to make a connector pane in the LabVIEW help system.

You should also find example VI's and run them with highlighting turned on so you can become familiar with how the VI's work, how dataflow works, and how it is different from sequential programing languages.

Mike

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.