From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

I'm trying to use VISA with LabWindows CVI to access the PXI DMM 4060, when I call the:

Help for VISA programming with C to control the PXI DMM NI4060.
Icould not use some functions within the VISA library.
0 Kudos
Message 1 of 6
(3,777 Views)
Is there any reason in particular why you are not using NI-DMM to program the NI 4060? Whenever you install NI-DMM, you install several examples of how to communicate with and program your DMM in LabVIEW, LabWindows/CVI, and other programming languages that are great starting points. If it is absolutely necessary that you program the board in VISA, which functions do not seem to be working?

Logan S.
0 Kudos
Message 2 of 6
(3,777 Views)
Thank you Logan S. for your message. The reason I Don't want to programm the DMM in LabVIEW, is that I have a graphical user interface for the NI-4060 device developed with Java, and which is intended to control this device remotely, so I need a wrapper as a an interface between java code and C code based on VISA Library to access and control the VISA device, that is N-4060. Possibly the interface can be developed using JNI (Java Naming Interface).
Now, I run some C code using VISA library to communicate with device, I could access the device using its description string (PXI2::13::INSTR), but I want to read the measuring data, I figured out that : viRead(ViSession vi, ViPBuf buf, ViUInt32 count,ViPUInt32 retCount) is not supported by the PXI INSTR clas
s, so how can I read data using VISA library.
In the extent to this issue, when it is useful to use either IVI or VISA libraries?
Thank you for the help.
0 Kudos
Message 3 of 6
(3,777 Views)
Thanks for your quick reply, but I'm still a bit confused. You mentioned using a wrapper to interface the C code and Java. So you are calling the VISA functions from the VISA dll, correct? Assuming that's your situation, there is no reason why you couldn't access the NI DMM dll and use the function calls therein to program your board. Please advise.

Logan S.
0 Kudos
Message 4 of 6
(3,777 Views)
Thank you for reply. That's right I'm calling VISA functions from VISA dll, I could communicate with the device and retrieve (Manufacturer ID, Model Name, etc.)
I tried to use functions like viRead, viVScanf and others to retrieve a voltage value from the NI PXI 4060, I figured out that these functions and others are not supported by the class INSTR PXI correspnding to my device.
So my question which method can I use to read values from the device and what kind of information to pass to the device: commands, formatting, etc..
I checked out the examples that come with National Instrument software distribution but there's not much more information.
You help is appreciated !
0 Kudos
Message 5 of 6
(3,777 Views)
Sorry for the delay in responding. I think I finally understand what you are asking. The function call that you will be most interested in is niDMM_GetAttributeViString. There are several attributes that you could use to find out information about the device that you are working with. I've attached a file below that highlights in particular three attributes, NIDMM_ATTR_INSTRUMENT_FIRMWARE_REVISION, NIDMM_ATTR_INSTRUMENT_MANUFACTURER, NIDMM_ATTR_INSTRUMENT_MODEL, that will hopefully satisfy your need.

For more information on each, if you have NI-DMM installed on your computer, go to Start >> Program Files >> National Instruments >> NI-DMM >> Documentation >> NI-Digital Multimeters Help

Good luck!
0 Kudos
Message 6 of 6
(3,777 Views)