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

NI 9871 Rs485 transceiver settings

$
0
0

I have a compactRIO NI-9871 RS485 module that connects to a tested custom RS-485 DAQ device.  I have done a loopback test on the 9871  using scan mode and it echos characters no problem.  I have tested the custom RS-485 device using an RS-485 to USB with LabVIEW in Windows without problem. When I connect my custom RS-485 device (4 wire mode) to the 9871 in scan mode it echos garbage back.  The device is only 2 metres away and not a noisy environment so I don't think I should need termination resistors.  My question is, how do I know that the 9871 port is setup as RS-485 4 wire?  In scan mode the tranceiver mode is not shown in properties, and it is also missing from the MAX COM port settings.  I am thinking maybe the 9871 thinks it is in 2 wire or RS422 mode.  Any ideas?

 

Thanks,

 

Rob Taylor


how to drive hpib by kusb488 with or without visa

$
0
0

the ISA pc of our lab, -to which an hpib card was fitted to connect an Agilent UV-VIS spectrophotometer- has crashed .

Since new pcs don't come with ISA slots,,the instrument has become unusable. I tried to connect the spectro by KUSB488 but though it is returning its address in VB6, no other response to common gpib commands are available from it like "IDN etc.

I tried with visa in VB6 but still no responce.Please advice

 

COM port time out, but can read back data from MAX

$
0
0

When short RX and RX directly, COM port can feedback data on MAX test panel, but always display "time out" error. What's the possible reason? Thanks. 

Driver for USB 1608 G

$
0
0

Hi everyone,

 

I'm new on Labview and I want to acquire data from a usb 1608G from Measurement Computing. I can acquire data thanks to the ULx for NI Labview Library included in the usb 1608 G but I would like to use the Measurement & Automation Explorer...

 

Unfortunately, it does'nt recognize the usb port... Is it because the usb 1608G is not a NI instrument? Is it because I don't have the correct driver?

 

Thanks for your answers,

 

 

Morgane CHARBONNEAU.

acquiring sensor data into the bus monitor using AIT MIL STD 1553 pxi card

$
0
0

I am a beginner in Labview.

I have a single channel AIT MIL STD 1553 card, I have installed the AIT instrument drivers and the 1553 card in one of the PXI slots.Now I need to acquire the current sensor data into the remote terminal(RT), then i need to command the RT to send the data to the bus monitor by using bus controller. i want this to happen in labVIEW. Please suggest me on which AIT example shipped along with the drivers would be best suitable for my application.

 

Keithely 2400 voltage sweep and measure current

$
0
0

Hi,

 

I have written a labview program(Attached) to sweep voltage and measure current in keithley 2400 source meter. My problem is, I get current output as zero for  all the values, but current values are displayed on the source meter. I would appreciate if somesone can help me to figure this out.

 

Thank you in advance

PNA - Getting Sweep data

$
0
0

Hi,

I'm an electronics student working for a electronic filters company over the summer programming.

 

I'm currently trying to writing a program in C for the PNA-L N5230C; that will set the start & stop frequency, set the number of sweep points, perform a single sweep and then get the result of sweep.

 

Everything is going well until I want to get the data from the Analyzer, as the text file made that should have the sweep data in doesn't have any.

I've looked Google to try and find a solution but not had much luck. I'm connecting to the analyzer via a USB B.

 

Any help would be much appreciated. Thanks.

 

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <visa.h>

#define PROG    "AgilentTest.c\0"
#define V       "0.02\0"

char pna[26][6] = {
          "pna1", "pna2", "pna3", "pna4", "pna5",
          "pna6", "pna7", "pna8", "pna9", "pna10",
          "pna11", "pna12", "pna13", "pna14", "pna15",
          "pna16", "pna17", "pna18", "pna19", "pna20",
          "pna21", "pna22", "pna23", "pna24", "pna25"
          };

int main( void )
{
    int h1 = 0;
    ViSession defaultRM, vi;
    ViStatus viStatus = 0;
    char buff[256] = {0};
    ViChar _VI_FAR cResult[2000] = {0};
    FILE *fTraceFile;
    static ViChar *cToken;
    int iNum = 0, lCount = 0;
    int iSwpPnts = 401;
    int addr = 0;
    double startF = 1e9, stopF = 5.2e9;
    int count1 = 0;

    /*Welcome statements*/
    printf("\n\nAgilent PNA test program %s %s \n\n", PROG, V);
    printf("----------------------------------------------------\n");
    printf("Do not use for actual measurements\nThis program is for testing\n\n");
    printf("Press any key to connect to an analyzer\n");
    h1 = getch();

    /*Special Skip Statement*/
    if(h1 == 104)
    {
      printf("Please enter an address:\n");
      scanf ("%d",&addr);
      viStatus = viOpenDefaultRM(&defaultRM);
      viStatus = viOpen(defaultRM, pna[addr] ,VI_NULL,VI_NULL, &vi);

      if(viStatus)
      {
        system("CLS");
        printf("Could not make a conection at this addr\n");
        getch();
        exit(1);
      }
        printf("\n\n\n\tSkipping search Connection as addr %d => %s \n\n\n\n",addr, pna[addr]);
        goto exit1;
    }

    /*Loop through ID strings to conect the analyzer*/
    for(addr = 0; addr < 25; addr++)
    {
      printf("addr = %d\n", addr );
      printf("Pna = %s\n", pna[addr] );

      /*Attempt to connect to analyzer*/
      viStatus = viOpenDefaultRM(&defaultRM);
      viStatus = viOpen(defaultRM, pna[addr] ,VI_NULL,VI_NULL, &vi);

      /*check opening session sucess*/
      if(viStatus)
      {
        /*If there are still more ID strings to check reset viStatus*/
        if( addr < 24)
          viStatus = 0;

        /*If all ID strings have been checked*/
        else
        {
  		    system("CLS");
          printf("Could not open a session to the device at any location, last check was at:\n\n\t%s\n\n", pna[addr]);
          printf("Press any key to exit program\n");
          getch();
          viClose(vi);
          viClose(defaultRM);

          /*exit 1 => failure*/
          exit(1);
        }
      }
      else
        goto exit1;
    }

exit1:
      system("CLS");
      /*Turn off automatic sweeps*/
      printf("continuous sweeps are off\n");
      viPrintf(vi, "INIT:CONT OFF \n");

      /*Set up the analyser with values*/
      printf("Setting strat frequancy\n");
      viPrintf(vi, "SENS:FREQ:START %f\n", startF);

      printf("Setting stop frequancy\n");
      viPrintf(vi, "SENS:FREQ:STOP %f\n", stopF);

      printf("Setting the number of points in a sweep\n");
      viPrintf(vi,"SENSe1:SWEep:POIN %d\n", iSwpPnts);

      /*Display Off*/
      /*Should help increase time it takes to complete sweep*/
      viPrintf(vi, "DISP:ENAB OFF\n");

      /*Set analyzer trace data format to ASCII Format*/
      viPrintf(vi,"FORM:DATA ASC \n");

      /*Preform one sweep*/
      printf("Running a single sweep\n");
      viPrintf(vi, "SENS:SWE:MODE SINGle\n*OPC?\n");

      /*Get the data frome trace1*/
      viQueryf(vi,"%s\n", "%#t","TRAC:DATA? TRACE1" , &iNum , cResult);
      cToken  = strtok(cResult,",");

      fTraceFile=fopen("SweepReadings.txt","w");

      while (cToken != NULL)
      {
        lCount++;
        cToken =strtok(NULL,",");
        if (lCount != iSwpPnts)
          fprintf(fTraceFile,"\tAmplitude of point[%d] = %s dBm\n",lCount+1, cToken);
      }

      fprintf(fTraceFile,"\nThe Total trace data points of the spectrum are :[%d] \n\n",lCount);
      fclose(fTraceFile);

      printf("Get data finished, press any key to disconnect from the analyzer\n");
      getch();
      /*Turn the display on, reset the analyzer and close the session*/
      viPrintf(vi, "DISP:ENAB ON\n");
      viPrintf(vi, "INIT:CONT ON\n");
      viPrintf(vi, "*RST\n");
      viPrintf(vi, "HCOPY:FILE PNATempImage.png \n");
      printf("Closing the session\n");
      viClose(vi);
      viClose(defaultRM);

      return 0;
}

 

Continuous Oscilloscope Acquisition

$
0
0

Hello,

 

My oscilloscope (Agilent DSO-X-2004A) can sample at 1GS/s, but can only window 100kS. I need that sampling rate, but for more than 100us (longest window for 1GS/s and 100kS). Can I acquire one 100kS set and begin recording the next 100kS set immediately after? In that way, I could patch together a data set spanning my desired time length. Otherwise, can I collect continuously from the scope?

 

I connect the scope to my computer via USB (could use ethernet too) and I have LabVIEW 2012 SP1 32-bit

 

Thanks for the help,

John Oxaal


GPIB-USB-HS found in NI MAX, but no instruments found?

$
0
0

am using Windows 7 on a PC, just installed NI-488.2 for brand new GPIB-USB-HS. I have the GPIB-USB-HS connected to an Agilent E4419B power meter.

 

 in NI MAX, i can see the GPIB-USB-HS just fine.

 

However, when i scan for instruments it says "no instruments found." it doesn't find the power meter at all. even though i have it connected to the Agilent power meter...it is definitely connected. The address of the power meter is 18 as it has always been.

 

the GPIB USB HS has amber "ready" sign. it never lights up the "active" LED.

 

I have set the remote interface settings in the power meter to GPIB, etc..i don't think it's anything with the power meter as i just used this with a different GPIB-USB-HS the other day (used labview) and had no problems at all.

Configuring ni Serial 8430/4 on Ubuntu 13.04

$
0
0

I need to configure 8430/4 serial card on Ubuntu 13.04. The problem is 'lspci -vvv' command isn't displaying the I/O port assigned to the serial ports on the card. Here is the output of setserial -gv /dev/ttyS* command:

 

/dev/ttyS4, UART: 16950/954, Port: 0x0000, IRQ: 19
/dev/ttyS5, UART: 16950/954, Port: 0x0000, IRQ: 19
/dev/ttyS6, UART: 16950/954, Port: 0x0000, IRQ: 19
/dev/ttyS7, UART: 16950/954, Port: 0x0000, IRQ: 19

 

How do I configure the ports ?

Capturing Logic Analyzer Waveforms on Agilent MSO-3054A

$
0
0

I am having an issue with capturing the Logic Analyzer waveforms on an Agilent MSO-3054A scope.

 

I am using the Agilent 2000 3000 X-Series LabVIEW VIs (see the attached block diagram).  The problem arises when the program hits the Fetch Waveform.vi.  I get the following error...

 

Error -1073807339 occurred at VISA Read; VISA:  (Hex 0xBFFF0015) Timeout expired before operation completed.

 

I do not get this error when I use the analog channels (using the appropriate VIs).  Everything works as I want and all four channels are displayed on the graph.  I have searched the internet high and low for a solution but cannot find one and need some assistance. 

 

Please advise.

 

 

How to get error message for VISA in CVI?

$
0
0

Hi there,

  I was using labview 2012 to handle GBIP interface with VISA, the VISA write code will return an error cluster if exists. Recently, I switch to CVI and I use viWrite to write to the GBIP, but in this case, how can I get the error cluster?

Advanced Energy RF generator

$
0
0

Hi... does anybody have a driver or a LabVIEW program written for AE's Ovation RF generator's serial port that can be shared?

Thanks in advance

How to open VISA session, Set GPIB / I.P. address in C#, working with .NET Interop assembly DLL?

$
0
0

Hi.

I generated .NET Interop assembly DLL from LabView 2012 and have to use it in C#.

DLL - is from Agilent 34401A labview driver.

.NET Iterop assembly wizard generated Initialize function like this:

 public static void Initialize(LVReferenceNumber VISA_32resource_32name, bool ID_32Query_32_40True_41, bool Reset_32_40True_41, out LVReferenceNumber VISA_32resource_32name_32out);        

What should I write in my C# test to set GPIB / I.P. addres? from Labview or MAX my DMM is acessible using address: GPIB0::22::INSTR.

Also, I have to generate DLL to scope and have to use I.P. address to open VISA.

I understand that I have to set some value to variiable:

LVReferenceNumber VISA_32resource_32name 

BUT, don't know exactly how to do it.

Can you help me?

Instron error code wavematrix

$
0
0

I use an Instron 8801 with NI GPIB card and a main component of the software called WaveMatrix in which you make and run tests throws an error code "File Error #10020 Value cannot be null Parameter name: value" whenever I try to save a test method. The software has no issues saving data from running pre-installed test files. The issue is when I try to modify the test parameters and save the method file. Has anyone seen this before? I am wondering if it may be GPIB related. Instron claims they do not know what this code is and it may be due to some permissions settings on my computer and not their sofware. This is the admin account and should be able to save any files so its not a permissions issue. DAX also works with no errors. Oddly enough the software will save methods on another PC I have running an Instron 1331 with an older GPIB card with no errors.

 

[Reposting in this topic as suggested by NI member]


Setting Frequency CH1=CH2 on Tek AFG3102 via Labview

$
0
0

Hey all,

 

Question.

 

Is there a way of turning on the frequency binding (Frequency/Delay --> Frequency CH1=CH2) of the two channels using Labview for the Tektronix AFG3102?

 

I looked throgh the forums, programming manual, vis and more. I found some info about it the programmers manual but it was really criptic.

Thanks for the answers

 

Th.

 

 

Labview 9 with GPIB-RS232 for controlling shutter at fixed interval of time

$
0
0

Hello,

I want to control my shutter using LabView. I have got a program for it from which I can see that shutter is being controlled. But I don't know how should i incorporate this conditional opening and closing of shutter. For example, I would like shutter to be close for  first "t1' sec and open for next "t2" sec and again close for "t1" and this repeated over unless stopped.

 

I am attaching the file also, Can somebody explain me how I can do it?

 

Thanks and regards.

usb-gpib hangs my system

$
0
0

My USB-GPIB-HS has screeched to a halt again. 

 

The software using the adapter simply stops and is unresponsive.  The only thing that works is unplugging the adapter from the USB.  That includes NI-MAX, which can hang while starting.  Unplug - NI-MAX starts and runs.  Plug in and discover instruments (or any other GPIB transaction) - freeze.  Unplug - unfreeze.

 

The first time was on XP SP3 and LV 9, with older versions of 488.2 and VISA.  The adapter was removed and replaced with a different one.  No problems there any more.

 

The questionable adapter was moved to a computer with NI-MAX 5.4, NI-488.2 3.1.1, and NI-VISA 5.3  It is used by a Python script.  It worked fine for a few weeks, until today the same behavior again.

 

Any suggestions before I toss it and buy a new one?

 

Thanks

Ed K

Suggestions on NI PLC

$
0
0

Hello,

 

I have a project where I need a PLC to control about 10 motors (turn them on/off, speed some up or slow them down).  What would you recommend for a PLC to use in this case?

VI_ERROR_RSRC_NFOUND error after Signal Studio Installation

$
0
0

Hello

 

We have 14 test tables in a measurement LAB and every table has a PC running LABVIEW and also GPIB ENET/1000 for GPIB devices. I install Agilent VSA software and also Agilent IO Libraries. Agilent VISA is installed as secondary VISA. There was no problem before installing Agilent Signal Studio Softwares. During the installation, installation manager says that it has to stop NI Configuration Manager, NI Device Loader, NI PXI Resource Manager and NI Variable Engine Services to continue the installation. I made it OK and after installation I restart the computer to get the NI Systems working again and check them in Control Panel > Administrative Tools > Services. They are working too. But after the installation when I opened NI MAX I got "No VISA resources found" error at Devices and Interfaces section. NI VISA can not detect COM1 port now. PCs that I do not install Signal Studio can detect COM1 via NI MAX. At the attachments there is screenshot showing the error.

 

So the problem becomes after Signal Studio Installation. I try to restart NI services, install new 5.4 version NI-MAX (we are using 5.3 version now) but these did not solve the problem. NI VISA 5.1 is present now in PCs. How can I fix this problem?

 

Thanks.

 

Emre Cetin

Istanbul Technical University

Viewing all 5663 articles
Browse latest View live


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