Quantcast
Channel: Instrument Control (GPIB, Serial, VISA, IVI) topics
Viewing all 5662 articles
Browse latest View live

Difference programmatically between NI GPIB-PCI and NI GPIB-USB-HS?

$
0
0

Hello all,

 

I am writing an application that accesses some GPIB equipment. On my development machine I have an NI GPIB-USB-HS connection and that is working just fine. On my first test machine I have a NI GPIB-PCI connection. The app seems to have a problem when sending commands to the GPIB over the PCI connection.

 

Using MAX on the test machine I can connect to the equipment and send commands over the PCI connection with no issues. Both the USB connection on my development machine and the PCI connection on the test machine are address 0.  The addresses of the GPIB equipment in both scenarios are the same, 4 and 12.

 

Because I am able to send commands through MAX on the test machine with the PCI connection, I am guessing I do not have a faulty hardware issue. I did try replacing the PCI connection on the test machine with another GPIB-USB-HS but my app is still not able to send commands to the GPIB equipment. But, through MAX I am able to send commands to the GPIB equipment over the new connection.

 

I was thinking there was some kind of difference needed in the code to use the PCI connection, but the behavior of the USB replacement has me confused.

 

Any ideas?


Gw INSTEK AFG-2005 not visible on MAX

$
0
0

I am trying to talk to a Gw INSTEK AFG-2005.

 

I downloaded and installed the driver and labview code from

http://www.gwinstek.com/en-global/products/Signal_Sources/Arbitrary_Function_Generators/AFG-2100_AFG-2000

 

The device is not visible in max although it is visible in windows device manager.

 

The labview code from gwinstek is not working for me (COM4).

(-1073807202 VISA Open in GW AFG2000 Initialize.vi)

 

I can talk to the device via teraterm but using exactly the same settings (teraterm close etc) I cannot even configure the serial port without it failing as follows:

code: -1073807202

source : Property Node (arg 1) in VISA Configure Serial Port (Instr).vi->talk to arb.vi

 

Any ideas why teraterm is working and labview is failing?

 

Traditional DAQ Resource Names Support in NI-DMM

$
0
0

I have an old application that still uses some NI-DMM resource names with "Traditional DAQ device number" syntax: DAQ::Traditional NI-DAQ device number[::INSTR]

 

After recently upgrading to Win10 and current versions of DAQmx, IVI, and NI-DMM, I now get an error in initialization:

Error -1074118656 occurred at niDMM Initialize.vi
Possible reason(s):
Error: (Hex 0xBFFA4000) ERROR: Device was not recognized. The device is not supported with this driver or version.
)

 

I suspect the problem may be the use of the old syntax, but looking at the NI Digital Multimeters Help for the niDMM Initialize VI (I'm using LabVIEW), it states:

Instrument Descriptor contains the resource name of the device to initialize.

The resource name is assigned in Measurement & Automation Explorer (MAX). Refer to Related Documentation for the NI Digital Multimeters Getting Started Guide for more information about configuring and testing the DMM in MAX. Valid Syntax:

  • NI-DAQmx name
  • DAQ::NI-DAQmx name[::INSTR]
  • DAQ::Traditional NI-DAQ device number[::INSTR]
  • IVI logical name

Can anyone confirm for me that this is the problem and that the documentation is wrong? Is there a document or readme somewhere that describes this change in functionality? Is this not really the problem?

 

Thanks!

Matt

Sensors/Actuators communication to a single laptop

$
0
0

Hello everybody, 

 

I'm a student in mechanical engineering, working on a project regarding the realization of a drop-weight impact test machine. One of the tasks is to create the proper software architecture to acquire data from the sensors and to drive the actuators.

My aim is to create a sort of plug-n-play hardware network (I don't know if I'm using the right definitions) that can directly interface with a laptop in a easy way, ex. via Ethernet.

 

I'm completely new to the world of LabVIEW and I don't have a big experience in signal processing, actually I'm studying the characteristics of the sensors at my disposal.

For example to measure distances I will use two laser sensors of the M7LL series, produced by MEL (you can find the manual as attachment). This type of sensors has an electronic system with integrated Ethernet interface, and a D-sub 25 plug for data and power supply.

My questions are, how can I create a communication between this sensor and a VI on my laptop? The in-out data through the D-sub are simply a copy of the data through the Ethernet, right? If it is so, can I use the D-sub only for power supply? Do I need any further hardware to use this sensor with LabVIEW? To conclude, how can I route data coming from different sensors (both from hardware and software point of view) in order to be able to connect all of them to a single ethernet port of the PC?

 

Thank you in advance for your patience and for your time

Edoardo

Driver Error when using Notify

$
0
0

 I have a C# application using several devices and I want to use Notify for some of them. It works most of the time but for some devices addressing them cause a driver error. Here are the details.

 

I send a "*SRE 16" command to two or three devices, then I configure them to be polled on SRQ like this:

 

board.Notify(notifymask, notifycallback, null);  //mask selects bit 4

notifylist.Add(device);  //add to list of devices to poll on SRQ

 

(There are other devices on the bus  for which the response time is not critical and which are not configured for setting SRQ and are not in the list)  

The notify callback function only sets a flag to notify other threads which devices should be polled, something like this:

 

public static void notifycallback(Object sender, NotifyData notifyData)
{
foreach (GPIBDevice device in notifylist) { device.pollflag=true } //signal other threads all devices that should be polled

Thread.Sleep(50); //give other threads time to poll their devices before rearming

notifyData.SetReenableMask(notifymask); //rearm to allow next notify

}

 

This works quite well, but for some hardware (eg a Tektronics scope), even if it is not configured to set SRQ (not in the list above), simply sending it a command causes error n°0 (driver error) or n°28 (power failure?).  The same scope works perfectly when other devices are not configured for SRQ.  This is very strange and I don't know where to start to debug this.   

Keithley 2410 - VI_ERROR_TMO: Timeout expired before operation completed.

$
0
0

Hi,

 

I'm trying to control a Keithley 2410 via python on an x86_64 linux machine (CentOS 7). I'm using python 2.7.5, NI-VISA 16 and PyVISA 1.8. The Keithley is connected to the computer via a a RS232-to-USB cable and it's configured for RS232 communication (with the parameters: baud 57600, bits 8, parity none, terminator <LF>, flow-ctrl none). When I try to query the Keithley I get a timeout error, as shown below:

 

>>> import visa
>>> rm = visa.ResourceManager()
>>> print(rm.list_resources())
(u'ASRL1::INSTR', u'ASRL2::INSTR')
>>> keithley = rm.open_resource("ASRL2::INSTR")
>>> print(keithley.query('*IDN?'))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/site-packages/pyvisa/resources/messagebased.py", line 407, in query
return self.read()
File "/usr/lib/python2.7/site-packages/pyvisa/resources/messagebased.py", line 332, in read
message = self.read_raw().decode(enco)
File "/usr/lib/python2.7/site-packages/pyvisa/resources/messagebased.py", line 306, in read_raw
chunk, status = self.visalib.read(self.session, size)
File "/usr/lib/python2.7/site-packages/pyvisa/ctwrapper/functions.py", line 1582, in read
ret = library.viRead(session, buffer, count, byref(return_count))
File "/usr/lib/python2.7/site-packages/pyvisa/ctwrapper/highlevel.py", line 188, in _return_handler
raise errors.VisaIOError(ret_value)
pyvisa.errors.VisaIOError: VI_ERROR_TMO (-1073807339): Timeout expired before operation completed.

 

Any suggestions as to what the problem(s) might be would be much appreciated!

 

Thanks

GPIB connection with Keysight B1500A analyzer - problems with Agilent 82357B controller

$
0
0

Hi NI community,

I am trying to control our Keysight B1500A analyzer remotely via GPIB using the LabView Development Environment.

 

I followed the suggested way of establishing a connection with the instrument using an Agilent 82357B USB-GPIB Controller. The Instrument is showing as a miscellaneous VISA resource in NI MAX and I am able to send and query simple commands like *IDN? from the VISA Testpanel within NI MAX. However If I try to use the sample VIs from plug and play drivers aquired over the NI Instrument Driver Network I am unable to find the B1500A as an instrument from the VISA resource dropdown menu. If I manually fill in the GPIB adress of the instrument shown in NI MAX (GPIB1::17::INSTR) I get a VISA resource error. Aditionally it has to be noted that the instrument does not show up under connected instruments in the tools>instrumentation overview in Labview.

 

If I retry the same procedure with an NI USB-GPIB-HS controller which I borrowed from another measurement setup, the analyzer is immediately recognized as connected instrument and also shows up in die VISA resource dropdown. The provided sample VIs also work (as far as I've come to test them).

 

Now I ask myself the question how I can get the same unproblematic connection using an Agilent 82357A or B Controller since I have to return the NI USB-GPIB-HS controller in the medium turn. I am also hesitant to spend money on a new NI controller while having three unused Agilent 82357A and B controllers on hand.

 

What I have done so far to tackle this problem:
- reinstall Keysight IO Suite and all NI Software from scratch (with the Keysight VISA installed as secondary in side by side mode)

- activating Keysight 488.2 support on both the B1500A device machine and the remote PC

- activating NiVisatulip passport in die VISA settings

- trying several alternative GPIB board numbers for the different USB-controllers

 

Software Configuration:

Windows 7 Enterprise 64Bit

LabView 2016 64bit
NI-VISA 16.0

NI-VISA runtime 16.0

NI-488.2 16.0

NI-488.2 runtime 16.0

NI DAQmx 16.0.1

NI-Serial Runtime 15.0

Keysight IO Suite 18.0

 

If I omitted any required information I am more than happy to provide it on request.

 

I somehow reached the end of my knowledge and am happy for any suggestion on how to make the connection work using one of the Agilent Controllers (if possible at all).

 

Thanks in advance,

TomTom

 

P.S. If this is a double post please delete it. However I was not able to find my original submission so I opened this one instead.

GPIB string for Prologix USB-GPIB adapter

$
0
0

I have the misfortune to be working on a project with the wildly unpopular prologix USB-GPIB adapter.

 

I can communicate with an instrument through the prologix adapter by using the VISA string 

ASRL4::INSTR

 

and then prefacing commands with ++addr{GPIB address}\r\n

 

e.g. ++addr\s1\r\n*IDN?\r\n

 

Is there a way I can directly address the GPIB device so I don't need to preface every command with ++addr\s1

 

Having consulted (http://zone.ni.com/reference/en-XX/help/370131S-01/ni-visa/visaresourcesyntaxandexamples/) I have tried a lot of combinations with no success.  Any help would be appreciated.

 

Rgds,

Seán


VISA or Code Library Missing/Error -1073807202 occurred at Property Node (arg 1)

$
0
0

I am trying to communicate with an Omega UTC-USB thermocouple connector. I am able to send commands and receive the temperature data, set degF or degC, etc in NI MAX and PuTTY terminals. When I attempt to implement this in LabVIEW 15 I receive: Error -1073807202 occurred at Property Node (arg 1) in VISA Configure Serial Port and the possible reasons are VISA or a code library required by VISA could not be located or loaded. I have VISA 16.0 installed and have also tried to "repair" it seemingly successfully. visa32.dll is in the correct location as recommended in other posts. I am running 64bit Windows 10 if that has any impact. Any help is appreciate, thank you.

RS232 PCI Shielding Problem

$
0
0

Hi

I have bought PCI-8430 RS232. I have found that the shield of the PCI card is connected to the GND of the serial ports. In fact a simple continuity test with a multi meter between pin5 of DB9 and the case of the card shows this problem.

When I install the PCI card to the motherboard, the shield of my pc will connect to the GND of the serial devices and this will cause serious problem in my application.

how can I solve this problem?

 

regard

NI PXIe-1082 : NI-max does not start

$
0
0

 Hello everyone, 

My problem might be either software or hardware, it’s not really clear yet, feel free to move my post in the appropriate section.

 

Until recently, I used a NI-PXIe 1082 with a couple of NI devices (NI 6368 & NI 2527). Communication between the devices and the computer has always been smooth. The entire system was recently moved (unplug-pack-move-unpack-plug). There has been no shock or damage done to the system whatsoever, however it does not work anymore since this transport (it may have nothing to do with it, but this is too big of a coincidence…). The OS is windows 10 32 bits. Labview version is 15.

 

Symptoms:

NI-max: Does not start. NI-max is stuck at the “loading plugins” step. If I wait long enough (>1h), NI-max does start but is not responding and must be closed.

Labview: Can’t initialize the communication with either of the devices I used to use. Returns an unspecified error #-2147220719.

 

What I have tried so far:

Pretty much everything I could find online… especially https://forums.ni.com/t5/Multifunction-DAQ/NI-MAX-stuck-at-load-plugins/td-p/1102284.

Restart NI configuration Manager using Microsoft’s Service app: The restart does not go through. It gives me the error 1053 (couldn’t stop the service because of a time out).

 

All help is appreciated,

Thanks

 

 

Communication with a Keithley 617

$
0
0

I'm currently trying to use an old Keithley 617 using the National Instrument UBS-GPIB HS adapter.

I installed all the required NI drivers required to use it. However, whatever command I use (e.g. "*IDN?\n"), it returns the value that is displayed on the screen of the Keithley 617.

I attached a print screen showing the problem.

 

It would be of much help if anyone knows how to solve this problem.

 

Emmanuel

Control and acquisition of data over LAN port

$
0
0

Hello All,

I have data acquisition system, which has got LAN interface with PC.

I would like to program in LabView to control and acquire data. But drivers are not available from OEM.

If I can read packets then OEM will provide data format to build driver.

Can anyone help me with the prcoess of reading and confirming data packets from LAN port and also further process of developing driver. if any example or ebook related to my requirement available please provide link.

thank you. 

Control DC power supply GWInstek PSM 6003 via RS 232 or GPIB using Labview

$
0
0

Hi,

i'm new in controlling instrument using Labview . i need to know how to control a programmable power supply GWInstek PSM 6003 and there is a driver or not 

thank you 

 

How to avoid installing the visa530full.exe

$
0
0
 
In the program, I used the functions provided by NI-Visa 530, such as viWrite, viPrintf...
but the visa530full.exe is 667MB and it's too large compared to the program.
When the program is released, how can I avoid installing or releasing  the  visa530full.exe with the program? 
 

COM adapter not working

$
0
0

Hello,

i created a c++ program using the IviDMM classdriverfunctions.

The program is working fine with a PXI NI DMM (IVI-C).

Now i tried to exchange it with an Agilent 34980A DMM (IVI-COM).

But now i get error -1074118124 = "Unknown status code" or -1074118653 = Unknown status code. 

 

What can i try to make this running?

Thx for all tips

best regards

 

My setup is:
Windows 7 64bit

IVI Compliance package 16.0.1 (with checked COM-adapter option during install)

NI MAX 16.0.0.f0

NI-DMM

Ag34980 ivi driver 1_5_5_0

GPIB-USB-HS and GPIB write error code 3

$
0
0

Hi

I have been using edgeport hub to communicate with an instrument which has multiple RS232 and one GPIB interace. The GPIB is connected to edgeport using GPIB-USB-HS. Max and LV 2010 communicates to edgeport via single USB. This set up is sucessfully used on a development PC (Win 7). Last week I moved the set up to a test machine which has additional RS232 and PCI-GPIB on it. I think the move was successful. however, one time edgeport experienced a power fluctuation and since then I am not able to communicate with GPIB-USB-HS. In LabVIEW I am using GPIB clear, GPIB trigger and GPIB write in sequence. 

I have attached current MAX setting for the GPIB-USB-HS and the VI i am using. GPIB clear and trigger says 'OK' while GPIB write ends up with 'Error 3'. I have looked into error codes here. The primary address is '3' and I am using that.

Interestingly when I went back to development machine, I am facing the same issue. Unfortunately, I forgot to document the MAX setting (only capture settings and forgot connections) , realizing how fool I am!  

Our old set up which directly takes GPIB cable (therefore no involvment of GPIB-USB-HS) works well. 

Did the power fluctuation affect the GPIB-USB-HS? 

Can't use VISA resource Error (Hex 0xBFFF009E), but can see instrument/query in NI MAX

$
0
0

As the title states, I have no problem seeing the instrument in NI MAX (instrument is an SR830 lockin). I have 488.2 installed for using GPIB-USB and VISA 16.0 is also installed. However, if I run any labview vi using VISA resource, it comes with the error HEX 0xBFFF009E, VISA or a code library required by VISA could not be located. However, I have removed and reinstalled VISA 16.0 several times. I've checked if there are any issues with hardware using another computer with a working version of Labview+VISA and have had no issues reading the device as setup. The only difference I can tell is the nonworking one is Windows 10 and the working comp is Windows 7. Still, they have the same installs, and I can see everything in NI MAX with both computers. Any help would be greatly appreciated.

Measurement I/0 Assistant Randomly Starts Returning Empty Strings

$
0
0

Hi everyone,

 

I'm trying to use the LabView instrument I/0 assistant to command and read from two 15 y/o Newport PM500-C motion controllers. The assistant uses VISA connetions to interface with the motion controllers, which are themselves connected with GPIB cables connected to the computer with an NI GPIB-USB-HS adapter. The code works as designed at the start of the program, but, after one or two dozen minutes of running, the assistant begins returning empty strings, instead of the position indicator strings it was happily running before, and I get VISA write error code -1073807339 when attempting to use the VISA Write function within the running VI. When empty strings are returned, the NI spy states that the code is only attempting to "VISA Get Attribute" from all devices on the GPIB whereas it lists that the computer was successfully querying and writing to the motion controllers when correct strings are returned. However, when the VI cannot effectively communicate with the motion controllers, I am still able to query them using the MAX NI-488.2 communicator. Even this sometimes returns "iberr = ENOL

ENOL indicates that no instrument was detected at the specified address. Verify that your instrument is powered on and properly connected to your GPIB interface" though everything is connected properly and I can communicate with the other motion controller on the same GPIB. This message does not return when the communicator is closed and reopened, and the general problem rectifies itself temporarily when the VI is restarted. I am wondering if these interface issues are caused by the obsolescence of the motion controllers, or if there is a way to prevent the I/O assistant from returning empty strings in the first place. Any ideas would be appreciated.

 

Thanks!

Instrument I/O assistant randomly returning empty strings

$
0
0

Hi everyone,

 

I'm trying to interface with two 15 y/o Newport PM500-C motion controllers by using the instrument I/O assistant. The assistant is using VISA interface, and the motion controllers are connected to each other with GPIB cables while the computer is connected to the whole setup with an NI GPIB-USB-HS adapter. My VI is able to read and write to the controllers for the first one or two dozen minutes of my code running, but, eventually, the assistant will start returning only empty strings instead of the position indicator strings it was happily returning before. During this time, I will also be unable to write to the motion controllers using the VISA Write function, which returns error code -1073807339, but may be able to do so with the NI MAX 488.2 communicator, though even this sometimes returns an error stating that there is no device connected even though all physical GPIB connections are secure. Restarting the 488.2 communicator clears this message. When the empty strings are being returned, the NI Spy reveals that the computer is only sending "VISA Get Attribute" commands instead of the query and write commands it showed when correct strings were returned. Restarting my VI temporarily corrects the problem, but it always returns after awhile. I am wondering if this connectivity problem is caused by the obsolescence of the motion controllers, or if there is something I can try to prevent the I/O assistant from returning empty strings in the first place. Any ideas would be appreciated. Thanks!

Viewing all 5662 articles
Browse latest View live