LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

buffer problem?

 i put the visa resouce number in the while loop but the same problem keeps occuring, maybe it's the hardware that has problems ? 

0 Kudos
Message 31 of 48
(1,165 Views)

I think you misunderstood me.

 

Run your hotplate VI with highlight execution set to on.

I think you'll see that you try to open the VISA resource twice and that on the second try, it will error out.

0 Kudos
Message 32 of 48
(1,162 Views)

i took out the VISA open is this waht you're talking about? however, it's still having the same problems. 

 

i emailed the company and they said it has something to do with the delays so i'm currently playing around with that right now. thanks so much for the input! 

0 Kudos
Message 33 of 48
(1,151 Views)

Can you post your updated VI?

0 Kudos
Message 34 of 48
(1,141 Views)

here's the updated vi

0 Kudos
Message 35 of 48
(1,134 Views)

Bad While Loop.PNG

 

The while loop in the attached screenshot is your problem.  You call Open VISA when iteration is equal to zero and again when iteration is equal to 1.

The second call to Open VISA likely returns an error and invalidates the reference.

 

Please take the time to apply the other corrections from my previous post to this VI as well.  If you intend to keep using this VI, I think it is a good candidate for refactoring.

0 Kudos
Message 36 of 48
(1,110 Views)

@Taki1999 wrote:

 

 

The while loop in the attached screenshot is your problem.  You call Open VISA when iteration is equal to zero and again when iteration is equal to 1.

The second call to Open VISA likely returns an error and invalidates the reference.

 


No.  Opening a VISA reference that is already open will not cause an error.  Also, if you don't explicitly open it, it will open itself the first time you try to use a VISA function.

0 Kudos
Message 37 of 48
(1,106 Views)

sorry, the hotplate.vi program is not the finished program, it's changed to hotplatefinish.vi if you can help me with that one?? thanks!!

0 Kudos
Message 38 of 48
(1,099 Views)

and using the visa open for this vi also didn't make a difference. still getting the error :S 

0 Kudos
Message 39 of 48
(1,098 Views)

For the visa write return count, it reads numbers but at random times for the visa read, it stops working as in it returns a value of 0.  has anyone had an issue with this?

0 Kudos
Message 40 of 48
(1,083 Views)