Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Drivers to communicate NI Instrument simulator v2.0

Hi Justin_E

 

I'm back again and trying to refresh my memory on instrument control because I'll be doing some of that in a new project. Here is a VI I built and I cant find anything wrong with the code but somehow I'm getting error messages:

 

Error -1073807346 occurred at VISA Open in National Instruments Instrument Simulator.lvlib:Initialize.vi->Simulator Acquire Waveform.vi

Possible reason(s):

VISA:  (Hex 0xBFFF000E) The given session or object reference is invalid.

 

Also, another question I have is how do I give the VI a more professional look?.   I wanted to put the serial settings in a cluster but I don't know how. Each time I created a control/indicator from the block diagram I end up with a classic control/indicator. I know the classic controls and indicators are more efficient and occuppy less memory but I don't like them. Do you know how to put the contrls in a cluster and without classic controls?  

 

See attached vi

 

 

 

 

0 Kudos
Message 11 of 17
(2,086 Views)

The VISA resource has to be selectable from the control and also visible in MAX. You simply cannot type whatever you want in the control or use the default.

 

When you create a control from the block diagram, the control used is the one that was originally used for the subVI. If you don't want those, simply add the control on the front panel with the controls palette. You can also right click on a control and select 'Replace'. Browse to the control you want.

 

Creating a cluster just requires you to drag the controls into an empty cluster.

 

This is a pretty basic stuff. Please see the LabVIEW tutorials.

0 Kudos
Message 12 of 17
(2,078 Views)

Hi Dennis,

 The VISA resource was configured and selected in MAX before I ran the VI and encountered the problem. I'm a bit suprised by your off hand dismissal of my questions.  How would you know if you didn't run the VI without any configured instrument? I only posted the VI along with the error messages to see if perhaps Justin_E or anyone else would run the VI using an NI simulator. 

 

I already tried "replace" for the controls before posting the question.  The controls I got weren't exactly what I was looking for.  I wanted the controls to have a white background in the entry boxes so that any entry could be easily seen just like in the VISA resource name control. 

 

I created a cluster when I initially built the VI but the controls were not the type I wanted so I thought may be there was  a different way of doing it. I still appreciate any further suggestions.

0 Kudos
Message 13 of 17
(2,068 Views)

You don't select the instrument in MAX. You select it from the VISA Resource Control on the VI. You click on the arrow and select it from the list. The error indicates that whatever you entered into the VISA Resource Control is not valid.

 

I have no idea what you configured in MAX. If you are configuring a com port, then you don't need to do that since you are configuring it in the VI you posted.

 

If you want different colors of different parts of controls, you can use the paintbrush.

0 Kudos
Message 14 of 17
(2,064 Views)

This is what I did

1) I configured the simulator to run in single mode with both GPIB(USB-GPIB-B controller) and Serial connection.

2) Tested them in MAX by sending different commands to the simulator and everthing worked OK.

3) I downloaded the drivers and built the VI and got the error message when I ran it.

 

Again, you keep on assuming that I wasn't doing the basic stuff correctly and that is why this exchange is getting rather frustrating. I mean who doesn't understand that you have to select the instrument from the Visa resource pull down before running the VI?. I just didn't type in "whatever" I wanted in the Visa resource.

 

Unfortunatley we seem to be on different pages here, I wasn't implying that I needed different colors, infact, that is far from what I'm trying to do. A picture would helped but I don't have one and can't find an example.

0 Kudos
Message 15 of 17
(2,054 Views)

You seem to have a big chip on your shoulder. Nine times out of ten, the error is caused by someone manually typing in the resource name. Until this last post, you did not say how you entered the resource. That is a lack of information on your part. You also said " I wanted the controls to have a white background in the entry boxes". Where I come from, white is a color and you color a control with the paintbrush tool. If you don't mean the color 'white' and in fact that issome codeword for something else, please explain. You said you wanted to look like the VISA Resource control so you obviously have a picture that you can take.

 

If you don't want people to assume that a new user is making common rookie mistakes, then provide full informatin at the beginning. You can also just search the forum for the error.

0 Kudos
Message 16 of 17
(2,049 Views)

I searched for the initial error and corrected it but now I have another error occurring. Here is the error

 

Error -1073807330 occurred at Property Node (arg 6) in National Instruments Instrument Simulator.lvlib:Initialize.vi->Simulator Acquire Waveform.vi

 

Possible reason(s):

VISA:  (Hex 0xBFFF001E) The specified state of the attribute is not valid, or is not supported as defined by the resource.

 

I've searched the knowledge bases and couldn't find a solution. I tested the baud rate using the test baud rate vi and it was ok. Do you have any idea how this can be fixed?.

0 Kudos
Message 17 of 17
(2,040 Views)