LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV freezes when 2 VIs are combined into one

Hi,

Please find the attached VI where I have put together both instruNet (P acquisition) and Ohap (weight) VIs into one VI.  I have used write to spreadsheet.vi to record the output.  The iNet VI is programmed to average and record the output every 10 seconds.  I tried using the same approach for the balance VI, but it did not work.  So, looks like the balance is recording the weight every 10 seconds, I am not sure.

The two VIs run fine when they are executed as two separate VIs.  But, when I combine the two, it freezes.  The run button is bold, but nothing is happening.  No other keys were functional,and I had to do a "ctrl-alt-del".

NOTE 1. I have run the combined VI earlier with a "write to text.VI" and open/create VI, and there was NO problem.  Also, this earlier VI recorded the raw output for both iNet and Ohap every second.

NOTE 2. The modified iNet VI (only) with mean, array, spreadsheet - runs fine.

I am not able to figure out what the problem is.  I am new to both LV and instruNet, and would appreciate if someone could help. 

Also, just as it is done for the iNet, I would like to get the data from the ohap VI as a mean, say, every 10 seconds or longer.

 

Thank you,

Swarna

 

   

.

0 Kudos
Message 1 of 8
(3,058 Views)
 
Please keep any messages about the same topic/problem in the same thread.Smiley Wink
0 Kudos
Message 2 of 8
(3,053 Views)

I had to re-submit my support request to ni.com, that is why it has appeared twice.

I apologize for the confusion.  

0 Kudos
Message 3 of 8
(3,045 Views)
You should be aware that a post on this forum isn't the same as submitting a support request to NI. These are public forums, and while NI monitors them, they're considered free "tech support", only insofar as the support comes mostly from other people. If you need direct support from NI you need to create a support ticket or give NI a call.
0 Kudos
Message 4 of 8
(3,039 Views)

Yes, I am aware that this is a public forum.  As I am a newbie with both instrunet and LV, I posted it here also hoping that someone in this group might be aware of/experienced these issues, and might help me find a solution.  I am also contacting NI.    

Would you like me to delete one of the two posts to avoid confusion?

 

  

 

 

0 Kudos
Message 5 of 8
(3,032 Views)
No, there's no need to do that since there's a reference to the other thread in this thread.

I was just pointing that out in case you weren't aware, since sometimes folks post questions on here assuming they're talking directly to NI. Smiley Wink
0 Kudos
Message 6 of 8
(3,022 Views)

I tried running it  a few times for 2-3 min. max.  The first couple of times, I got both volt and weight data.

Then it started crashing, but only for the balance.  I still get pressure data.

This is the error message that I got:

Ohap Error 1073807246 occurred at VISA open in Ohap Initialize.VI.

Possible Reasons: (Hex 0x BFFF0072).  The resource is valid, but VISA cannot currently access it. 

What does this mean?

 

Thanks,

Swarna 

 

0 Kudos
Message 7 of 8
(3,000 Views)

That basically means that something else has the com port open.  Do you have any other programs trying to access the serial port with the balance at the same time?  Take a look inside ohap Read Measurement to see if there is any code there that may be doing something to the VISA resource.  We can't look at it because we don't have those subVI's.

Though something doesn't make sense about your description.  The error message says it is happening in ohap initialize which only executes once at the beginning of your program.  But you say that it does work properly for awhile.  So you are either having the error in that initialize subVI at the very beginning and then always getting an error.  Or if it reads for awhile, you shouldn't be getting an error from there because it only executes once.

How are you running your program?  Please, I hope you aren't running it with the Run continuously button.  Though it doesn't look like you would because you do have a classic architecture of initialize before a loop, run in a loop until Stop is pressed, and close resources after a loop.

0 Kudos
Message 8 of 8
(2,988 Views)