cancel
Showing results for 
Search instead for 
Did you mean: 

buffer problem?

jabano
Member

Re: 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 ? 

Taki1999
Active Participant

Re: buffer problem?

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.

jabano
Member

Re: buffer problem?

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! 

Taki1999
Active Participant

Re: buffer problem?

Can you post your updated VI?

jabano
Member

Re: buffer problem?

Message contains an attachment

here's the updated vi

Taki1999
Active Participant

Re: buffer problem?

Message contains an image

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.

RavensFan
Knight of NI

Re: buffer problem?


@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.

jabano
Member

Re: buffer problem?

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!!

jabano
Member

Re: buffer problem?

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

jabano
Member

Re: buffer problem?

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?