LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Momentary switches and sequential logic--- seeminly not available in Labview

File attached. The "str frefnum" and "slide in" are refnums that resulted after creating the subvi

[BADGE NAME]

0 Kudos
Message 31 of 39
(1,262 Views)

Do you actually have broken wires in your subVI?  Or is that an artifact of using LabVIEW's built-in VI snippet to post the code.  If you actually have broken wires, you need to fix them first.  We can't help with that because your picture doesn't show enough information as to why they are broken.

 

Assuming the wires are actually okay, you need to make sure those VI control references in the subVI are connected to the subVI"s connector panel.  In your main VI, you need to get whatever control you are going to be working with, right click on that and pick Create Reference.  Then wire that reference contstant into the subVI's connection.

0 Kudos
Message 32 of 39
(1,252 Views)
RavensFan,

Thank you for your feedback. No I have no broken wiires, just and artifact of creating a snippet. Remember that I am very much a beginner in this business :). I believe your comments would likely solve this but I first have to figure out how to connect the control references to the subvis connector panel. While I try to do that ( so I don't appear to be spoon fed too much :)) kindly send me a brief direction on how to do that.

[BADGE NAME]

0 Kudos
Message 33 of 39
(1,241 Views)

If you would follow my suggestion/plea to (a) put all of your VIs inside a folder, (b) compress that folder to a Zip file, and (c) attach that Zip file, we can make much faster headway into (1) seeing how the various pieces of your code "hang together", (2) begin to understand all of what you are trying to do, and (3) make "global" suggestions that get to the heart of the difficulty you are having (instead of going back and forth with 4-6 posts and not getting very far).

 

This will definitely waste less of your time ...

 

Bob Schor

0 Kudos
Message 34 of 39
(1,228 Views)

Bob,

 

I will do that, but will prefer to exhaust this option about connecting refnums to connector pane. My state machine has significantly changed since the "maink". if it does not run after connecting my subvi terminals properly then i will send the full package. 

 

 

Ravensfan,

 

Attached is a screen shot of what this subvi front panel currently looks like and the drop down from the top right corner of the front panel.

 

I am unable to (or dont know how to) connect references. let me know how to proceed.

 

Let me also add one point which i think is important:  The original large vi i made works (but wont allow code to be rerun). As soon as i turned this particular section of code  into a subvi within the same large vi, the large vi will run just before that code section and stop!

 

This was way before i even started doing anything with state machine. So i believe this subvi is kind of "missing references "

 

Thanks.

[BADGE NAME]

Download All
0 Kudos
Message 35 of 39
(1,220 Views)

@blessedk wrote:

Bob,

 

I will do that, but will prefer to exhaust this option about connecting refnums to connector pane. My state machine has significantly changed since the "maink". if it does not run after connecting my subvi terminals properly then i will send the full package. 

 

 

Ravensfan,

 

Attached is a screen shot of what this subvi front panel currently looks like and the drop down from the top right corner of the front panel.

Wow, they really are screenshots!  You really need to attach your code like Bob says so we can actually see what you are doing wrong.  A picture may be worth a 1000 words, but a VI is worth a 1000 pictures!

 

I am unable to (or dont know how to) connect references. let me know how to proceed.

Follow the words I wrote in my last message.  (Note, that was written based on what I think you are having a problem with.  It is impossible to know for sure without having seen your actual code.)

 

Let me also add one point which i think is important:  The original large vi i made works (but wont allow code to be rerun). As soon as i turned this particular section of code  into a subvi within the same large vi, the large vi will run just before that code section and stop!

 

This was way before i even started doing anything with state machine. So i believe this subvi is kind of "missing references "

 

Thanks.


Have you taken those tutorials yet?  If you haven't, you really need to.

 

 

0 Kudos
Message 36 of 39
(1,197 Views)
Thank you so much Bob and RavensFan. RavensFan as you have been pointing out " create reference " - that was all I had to do! Second vi works now but I have a few more glitches to go through. Quick question: one of my subvis writes/reads TDMS file and I have a file permission error when it tries write/read. This does not happen pre-SubVi/ state machine. Does anything quickly come to mind ?

[BADGE NAME]

0 Kudos
Message 37 of 39
(1,178 Views)

Certainly if you have the file open elsewhere, (such as Excel) it will give an error.

 

Possibly you have other LabVIEW code running in parallel where you are also trying to open it.

0 Kudos
Message 38 of 39
(1,172 Views)
Bob's earlier comment did the magic this time. I had to pass back a file path through the shift register and it did the magic regarding the file error . I have learnt so much through this exercise the hard way. Going by the fact that I have never developed a program before 🙂

[BADGE NAME]

0 Kudos
Message 39 of 39
(1,164 Views)