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

VISA Error: (Hex 0xBFFF0011​) during access to MEMACC resource

$
0
0

Hi!

 

VISA_open returns strange error "insufficient location information or the device...".
But I try to open PXI0::MEMACC resource.
In my opinion memory resource should exist in system.

 

Why this error does appear ?

 

Thanks!


Capture screen Agilent 9010A

$
0
0

Hey Guys,

 

iam working since one week with the Agilent N9010A EXA Signal Analyzer. Iam using LabWindows. I established a connection via USB using the Driver below:

 

http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=4107B41C481761E0E0440003BA7CCD71

 

So everything works fine, Iam able to connect, to configure the Device...

But now I have to take a screenshot of a specific Screen. It does not matter if the Screenshot is stored on the Device or send to the Computer. Our customers are used to the screenshots from the Device so if i would reconstruct the whole screens, it would be a mess.

 

Unfortunatly I didnt find any function from the Driver to do that. I read in this forum, that there should be a possibility to programm every function the Device can execute. How can i gather a screenshot?

 

Thank you guys!

A

vxi emulator

$
0
0

Hi! Sorry for my english. Using Qt & C ++ to control devices on the LAN (VXI-11).

I want to make an emulator device that would take command *IDN? and others, and answered.

I create a test program with a socket connection on port 5025, but NI Max does not find my emulator.

What should be done to NI MAX found my emulator and thought that this device?

Agilent 33521B - how to trigger two consecutive frequency sweeps using GPIB

$
0
0

HI there,

I am using an Agilent 33521B waveform generator and I'm contolling it via GPIB. 

I would like to run a sequence in LabView that triggers two frequency sweeps one after the other, each with different sweep parameters.

 

For instance the first sweep would have a start frequency of 100Hz and stop frequency of 1KHz over 500ms seconds and then immediately after i would need to trigger a second sweep with start frequency of 1KHZ to 20KHz over 1 second.  

 

I have attempted to do this using a flat sequence and waiting until the first sweep has finished and then change the sweep parameters before triggering the second. However when i do this, there is a delay between the sweeps that seems to not be consistent between runs which isn't good, plus the waveforms do not look too healthy when viewed on an oscilloscope  

 

I have attached my code below. I am also using the "Agilent 3352X Series" drivers for this, which i have also attached.

 

Any help on getting the sweeps to commence immediately after one another would be very much apprectiated 

 

Regards

Rhys

IviFgen Initialize.vi

$
0
0

Hi everybody,

 

I wrote a small programm using IVI Class driver - IVI Function driver (first attached file), but when I run it I have a problem - Hex 0xBFFF009E and also

 b>Complete call chain:</b>
IviFgen Initialize With Options.vi
IviFgen Initialize.vi
Untitled 1.vi

 

(see second attached).. Actually I have a working IVI driver from the company for my Tabor AWG 1072 and everything works fine. Just I can't understand what is the problem with this IVI CLASS driver. Maybe I use it for the wrong purpose or what? THank you very much in advance.

Fail connection of RS-232 in different Windows

$
0
0
Hi,
 
I am doing a kind of reverse engineering to use our old program in new Windows version.
 
I had a weird issue on connection to RS-232 and I am wondering if you believe my situation.
 
I found some connnection parameters (2400 baud rate, 7 data bit, Even parity, Xon/Xoff control, 1 stop bit) of my instrument by a commercial serial monitoring program.
 
The instrument is around 20 years old.
 
The original operation program was operated in DOS and can be executed now under DOSBOX installed in windows XP with connection of USB to Serial connector.
 
When I operate the hyperterminal on XP under these conditions, I got some responses and it was okay.
 
But, when I try the same thing with hyperterminal or NI-MAX, LabView VISA code  on Windows 7 (still USB to Serial connector), there is no any responses (no text).
 
The instrument should response for any written text but no response for my any input. 
 
In my experience, I have never met such an issue and took several days to watch out for other possibility.
 
I tested this with two laptops of Win 7 which had no problem in other RS-232 connection. and one trial by cleaned Win 7 laptop.
 
Have you heard about this issue depending on Windows version?
 
If you have some idea (like reliable program) to check this issue more, please share your idea with me.
 
labmaster
 
The following was obtained by a commercial program in WinXP.
-----------------
[19:18:06:109]
31523 IRP_MJ_DEVICE_CONTROL - Request operates a serial port (COM1)
    STATUS_SUCCESS
        IOCTL_SERIAL_GET_BAUD_RATE - Returns the baud rate that is currently set for a COM port
            BaudRate - 2400
----------------------------------------------------------------------------------
[19:18:06:109]
31525 IRP_MJ_DEVICE_CONTROL - Request operates a serial port (COM1)
    STATUS_SUCCESS
        IOCTL_SERIAL_GET_LINE_CONTROL - Request returns information about the line control set for a COM port
            StopBits   - 0 (1 stop bit)
            Parity     - 2 (EVEN_PARITY)
            WordLength - 7
----------------------------------------------------------------------------------
[19:18:06:109]
31527 IRP_MJ_DEVICE_CONTROL - Request operates a serial port (COM1)
    STATUS_SUCCESS
        IOCTL_SERIAL_GET_CHARS - Request returns the special characters that Serial uses with handshake flow control
            EofChar   - 0
            ErrorChar - 0
            BreakChar - 0
            EventChar - 0
            XonChar   - 17
            XoffChar  - 19
----------------------------------------------------------------------------------
[19:18:06:109]
31529 IRP_MJ_DEVICE_CONTROL - Request operates a serial port (COM1)
    STATUS_SUCCESS
        IOCTL_SERIAL_GET_HANDFLOW - Request returns information about the configuration of the handshake flow control set for a COM port
            ControlHandShake - 0x00 
            FlowReplace      - 0x00 
            XonLimit         - 2048
            XoffLimit        - 512
----------------------------------------------------------------------------------

Schleich MTC2

$
0
0

Has anyone already used a Schleich MTC2 surgetester ?

I'm looking for existing solutions to read the test results of the MTC2 with a LV application in order to store them in a file with a proprietary format.

 

  • RS-232 or USB LV driver to communicate with the tester.
  • VI to extract the results from MTC2's access database (*.mdb). I don't have an MS Access licence.
  • Software from the supplier which stores the results in a configurable or at leat in an easy to read format .
  • ...

At this point, no alternative is excluded.

 

Many thanks in advance for any advice.

visa alias

$
0
0

I am currently working on an automated test procedure in LabWindows using some power supplies, oscope and a sensor. I have created a setup file with LabWindows distributions builder and I am importing a NI MAX .nce configurations file into the setup. The setup installs all of the necessary software (i.e NI MAX) and drivers needed to communicate with the instruments. However, the instruments alias has to be populated with a specific name for each instrument. I am wondering if there is any way to automatically populate NI MAX with the proper aliases for each instrument. I thought it could be a possible option in the NI MAX .nce configuration file that i've exported from my current machine's NI MAX configuration. 


Comm port not detected by VISA / MAX after attached device power cycle

$
0
0

I have a device communicating via virtual comm port over USB. The device and labview program both work fine, most of the time. The program is designed to auto-connect to the attached hardware. This works perfectly when i unplug and reconnect the USB cable.

However, if the device gets power cycled whilst the USB cable is attached and the program/vi is running things go wrong. The device enters a bootloader phase for a few seconds on power up, if labview attempts to query the comm port during this phase the comm port is then corrupted in some manner and no longer recognised by VISA / NI MAX. However, all other programs, hyperterminal, device manager etc can see and communicate with the port once the bootloader has finished. To get Labview / NI MAX to see the port again i have to physically unplug the USB cable. The program does not need to be restarted to detect the comm port again, And, infact, restarting labview or my compiled program does not fix the issue. Only physically unplugging the USB port allows VISA / NI MAX to see the port is connected.

It looks to me like a problem with VISA where somehow if a device isn't properly identified by VISA on the first attempt it just ignores the port exists until an physical intervention. Is there a way to force VISA to fully re-evaluate all connected comm ports?

SR400 Triggered Gating

$
0
0

Hi,

 

I used a LabView program to collect the data from SR400 through GPIB.

 

Now basically what I need is that we send in TTL signal to SR400 and only let the photon signals within the timing duration we want pass through. 

 

Hence we want to use the high(low) voltage to open the gate and use the low(high) voltage to close it, which means we use the extenal signal to control the gate width.

 

However, the gate width is determined internally. 

 

Would you please tell me how can I let the photon signals within the timing duration we want pass through?

 

Thanks!

Computer recognized PCIe-GPIB but not PCI device

$
0
0

In NI MAX and windows device manager, I have the PCI-GPIB device, but it can not recognize the PCI 6713 and PCI 6733 that are connected.  Both of the PCI devices have a green LED that flashes for about a second every couple seconds.  Everything is connected and powered as it should be.  Thanks for any help.

Trying to communicate with TCP/IP through VISA runtime

$
0
0

Hello,

 

I am trying to create a vi to communicate with a laser via TCP/IP.  The laser has a fixed IP address and using my development computer with NIVISA 14.0.1 installed with Labview 2014, I can manually enter the IP in MAX and the vi works correctly.  However, the vi must be run as an executable on Production computers that will only have the LabView and VISA runtime engines installed.  The vi is set up with a dropdown box for the recognized VISA resources and is typically filled with COM and LPT ports.  The fixed IP is visible in the development computer's dropdown, but I can find no way to add it in the runtime only version.  How can I do this?

 

Thanks!

serial port communication record data with continous timestamp

$
0
0

I have a serial device that outputs a single data point (Oxygen %) every ten minutes, but I would like read/record to a waveform chart and output file at different rates.  Such as every second from start of vi(last Oxygen %) in a waveform chart and every minute in the output file.  Currently, I can get data only as serial device outputs it.  Attached is a jpg of current vi.  Any help would be greatly appreciated.

 

 

dsc + modbus-rtu plc

$
0
0

Hello.
I use USB - RS485 converter to connect to my plc. I can read holding register with measured value and with assignment value, but i cant write assignment value.
I use i/o server with this settings -  Modbus-RTU, 9600/8N2, shared variable are (S)400002 and (S)400003.
Thanks

Modbus RTU read VI generates error 56 (timeout) when trying to read data from RS-232 to RS-485 converter

$
0
0

I've been banging my head against this for a while, and none of the relatively similar threads here have helped.

 

My setup:  A WattNode Modbus power meter hooked via 2-wire RS485 to a bidirectional RS-485 to RS-232 converter, plugged into a good serial adapter.  LabVIEW 2014 with basic Modbus VIs, trying to read some registers from it.  Action is a very simple Modbus RTU read request.

 

The problem:  When a read request is made, the device flashes a green light indicating that it has received a properly-formed packet addressed to it, so the outgoing signals are working fine.  The RS232 adapter flashes the Rx light in addition to the Tx one, so it is also seeing data coming back from the device.  LabVIEW, however, always returns an error 56 (timeout), so it either doesn't see the data or isn't recognizing the packet.

 

Things I've tested:  The software is known to work when using a National Instruments USB-RS485 adapter, so the basic protocol and method of requesting registers from the device already checked out okay.  This particular device has been read using this exact software with an RS485 adapter, so the device is okay.  The serial adapter worked fine previously with RS232 devices.  Port settings (speed, stop bits, etc) appear to check out, and if I intentionally set them wrong the device flashes the LED red indicating malformed packets, so that appears to confirm that the settings (and request transmitted) are correct.

 

When sending packets directed at another Modbus address, the device registers a correctly formed packet addressed to a different device (yellow flash of its status LED), and I do not see the Rx light on the RS232 adapter flash, indicating that I am seeing returned data, not just reflections or something.

 

Adding termination does not help, but the wire run is only about a foot.  The RS485 converter is port-powered, but adding 5V external power (optional) did not help.

 

Because it's Modbus RTU, reading raw data from the port is a little harder, so I haven't been able to scan to see if the data coming back is correct or garbled.

 

After trying every variation of settings I can think of, the only things I can come up with are that the adapter is garbling the returned packets but not outgoing ones, that LabVIEW is not seeing the incoming packets at all due to some configuration error, or that what I'm doing just doesn't work due to duplex issues of some kind.

 

 

Anyone have any suggestions apart from getting a dedicated RS485 port instead of using an adapter?

 


Error Reading from HP 66xx PSU

$
0
0

/* New user warning */

 

I have been learning (slowly) to get a set of external instuments connected to LabView. For the most part, I have been succesful reading and writing commands and data from basic instruments. There is a problem that I cannot figure out with both of my Agilent 6653A power supplies. 

 

I can get the supplies to turn output on/off as well as adjust volts/amps. The problem is trying to read measured volts and amps back. The VI freezes and offers an error message that I do not understand. Here are some screen shots, if it is helpful to upload the VI's, of course I can do that. 

 

This is a test VI that only function is to have basic control of the power supply and a Keithley DMM to do a comparison read. Both work just fine until I add the READ MEAS vi on the power supply section of the block diagram. It seemed simple, pass the VISA and ERROR through and it should spit out the voltage and current as a DBL.

 

63XX TEST E.png

 

 

 

I manually tested the commands and the returned data looked ok. 

 

 

63XX TEST B.png

 

 

 

 

FIRST ERROR........

 

63XX TEST C.png

 

 

 

 

SECOND ERROR......This one is related the Keithley DMM

 

63XX TEST D.png

 

Not sure where to look for an answer. Hoping there is a simple answer. 

 

Thanks in advance to anyone willing to take the time to help. 

 

 

How to implement the communication of USB to RS232 in the compactRIO?

$
0
0

Hi,

 

Now I have a compactRIO controller NI-9024, and a RS485 module of NI-9871, however I'd like to connect an instrument, say power meter, with RS-232 communication.

I wondered if I can take advantage of the USB port and Serial port on the controller, but I failed to communicate the instrument by the USB and Serial port.

I also wondered if I can use a RS-485 to RS-232 adapter, and use NI-9871 to communicate with the instrument, but I still cannot make it.

Is there no way to utilize the NI-9024 and NI-9871 to implement RS-232 communication?

Do I still have to get NI-9870 to do my project?

Could anyone give me some suggestion?

OMICRON CMC 256plus

$
0
0

Buenas tardes,

Tenemos un instrumento Fuente Trifásica OMICRON CMC 256plus, el mismo tiene 4 salidas de tensión y 6 salidas de corriente (3 salidas A y 3 salidas B), en los códigos que hemos bajado solo se pueden controlar 3 salidas de tensión y 3 salidas de corriente A. ¿cómo puedo manejar la 4ta salida de tensión y las otras 3 salidas de corriente B? Les agradecemos cualquier ayuda al respecto.

timestamping ADC values and seperation

$
0
0

 i have a question, im am trying to timstamp my adc values from my microntroller via uart. so i have ADC values and timestamp from uart as one string ACSII. The data send sets of 512 numbers of adc and then the timestamp every second. The data sends as follows

 

$ADC Values,$time,$ADC Values,$time,$ADC Values  

 

and so forth, repeats same pattern. You can see the values in th read buffer from the pictures i attached the last picture of the buffer is the time. I initially use the visa termination character to catach the dollar sign then i  use a "Scan from String" to get the time and then have that output to the "to" of the build waveform. then i have the remaining string go into a "spreadsheet string to array" to get comma out and convert to double. I guess i could probably expand the "Scan from string" and separate both using that instread of using the "spreadsheet string to array". I also get this error from " Scan from string"

 "LabVIEW:  An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @."

 

If you can please help that would be great i have attached my code and pictures of read buffer.

Parsing serial data into different sets

$
0
0

Hello i am continously sampling data from the ADC on my micro the format my data is sending is as followed

 

$1,2,3,...................,$GPStime,$

 

i have a dollars sign at the beginning of the adc values and a dollar sign at the beginning of time and commas. I use the scan from string to separate the two but i get the following error.

 

Possible reason(s):
 
"LabVIEW:  An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @."
 
 I dont understand why i am sending straight ascii values, When i send just one type the spreadsheet string to array works just fine but i obvuously cant use that for different types. Please see attached of code and block diagram. I would greatly appreciate comments.
Viewing all 5662 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>