04-25-2008 09:08 AM
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
.
04-25-2008 09:25 AM
04-25-2008 09:55 AM
I had to re-submit my support request to ni.com, that is why it has appeared twice.
I apologize for the confusion.
04-25-2008 10:09 AM
04-25-2008 10:26 AM
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?
04-25-2008 11:03 AM
04-25-2008 03:05 PM
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
04-25-2008 04:11 PM
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.