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

Agilent 33521A control VI

$
0
0

Hi, 

 

I am a newbie to labview and currently struggling to in writing VI for controlling Agilent 33521A function generator. 

 

Basically, I would like to control the function generator and receive its output from the oscilloscope. 

I have attached the image of my current VI which contains the SCPI code for controlling outputs from the function generator. 

 

However, I would like to give specific frequency of the output for given time and other frequency (same waveform with different F) after some fixed time. 

Thus, I want a frequency stored (like "a=frequency") and  an user control knob or a box in the front panel for this frequency user input. And possibly use this stored value to somewhere else; like calculating time division at oscilloscope capture. 

 

I am sorry if this is not clear enough. Any advise would be a great help. 

 

Thanks!


GPIB-USB-HS Windows 7 can not load device drfiver for the hardware. The driver may be corrupted or missing Code 39

$
0
0

The driver is version 3.1.0,49154 and when I go to Update Driver message returns I have the most current. In NI-MAX the GPIB shows in device and instruments.

 

How can I get Win 7 to load the driver?

82351a with labwindows cvi

$
0
0

Hello,

I am trying to use Labwindows CVI 2013 with a GPIB card, Agilent 82351a and it can't talk with a GPIB instrument connected to the GPIB card.

NI-MAX can see the 82351a card but I can't use this card to talk with an instrument.

I installed Labwindows CVI with NI-VISA 5.4, AGILENT IO suite 16.3 with Agilent Visa a secondary VISA.

 

With NI-MAX, in the options VISA, I enable "Passport for Tulip" and with Agilent Connexion Expert, I tried to enable '"programs Agilent GPIB cards for 488" but it reboots the PC and the option remains not validated.

 

I wan't to know if this Agilent 82351a card can work with Labwindows CVI 2013.

thanks

82351a with labwindows cvi

$
0
0

Hello,

I am trying to use Labwindows CVI 2013 with a GPIB card, Agilent 82351a and it can't talk with a GPIB instrument connected to the GPIB card.

NI-MAX can see the 82351a card but I can't use this card to talk with an instrument.

I installed Labwindows CVI with NI-VISA 5.4, AGILENT IO suite 16.3 with Agilent Visa a secondary VISA.

 

With NI-MAX, in the options VISA, I enable "Passport for Tulip" and with Agilent Connexion Expert, I tried to enable '"programs Agilent GPIB cards for 488" but it reboots the PC and the option remains not validated.

 

I wan't to know if this Agilent 82351a card can work with Labwindows CVI 2013.

thanks

Save custom file name using MS Office Report Express VI

$
0
0

When my program creates a report, I want to save it as a serial number defined in the report.  I want to use the MS Office Report Express VI to do this but unfortunately it only allows you to save the file name as a time/date and/or incremental number.

Problem of connection between Signal Generator R&S SMG and GPIB

$
0
0

Hello everybody,

 

I have many instruments that I control with GPIB including the signal generator R&S SMG, and I can communicate with the SMG but after a time, MAX NI doesn't recognize it and I can't do anything with it in local mode, It doesn't respond to any button, so to control it, I must turn off the device and then turn on to control it in local mode, but NI MAX doesn't recognize it. But if I wait 5 minutes before turn on the device, MAX recognize it. So I am confuse and I don't know why it happens.
 If you have a solution, it will be perfect,

Sorry for my english,

Regards,

Flo

visa, Data mismatch

$
0
0

Good afternoon.

Im really new in comunications so I will apricate your help.

I have a Vi that sends and recieve data, so it is a constantly changing state machine that changes from "transmit" and "recieve".

This vi Controls  and reads a ptrototype Im working with ardouino.  So i if a button is pressed it will send a  byte to arduino and arduino will interprete it. 
After that arduino should be sending  12 bytes. the i make string subsets to devide them in 4 packages of 3  bytes each and  graph them. Each package is a position of my prototype.

The problem is that I dont get the 12 bytes I need. For example I get 6 bytes from the old transmition and 6 of the new,  or 3 from the last and 9 form the new etc.

I tried to put an identifier character, and read  the buffer. If the first byte is my identifier byte then divide and graph my data.
This solves the problem but is still sloppy and unpractical because a lot of data i getting lost , also the graph is not as smooth as it should be.

My first hypotesis is that  arduino is sending to quickly the data, becouse i made a program that just sends 12 bytes  with a delay of 100ms and it was fine. I cant put a delay in arduino because it will mess the prototype. 

My second hypotesis was that i was flushing the buffer the wrong way, I flush it in the transmit state.

Any suggestion? 

I heard about putting an identifier to the transmition so it will start reading from the desire byte. What dou you think? 
Thank you 

 

 

Use GPIB-USB-HS in place of HP Comm Card (82335)?

$
0
0

Recently had one of my engineers use an old computer, and found it is having hard drive issues.  I got the old PC back up and running, but I think that this is a good time to try and upgrade the hardware/software.

 

Old Computer:

Running Windows 95

Using a HP Communications Card (GPIB) model 82335A

The HP card then connects to a HP 8751A Network Analyzer

This runs software called HP Instrument Basic (iBasic), and has several tests saved

 

New Computer that I want to upgrade

Basic Desktop PC running Windows 7 32 bit

I have a NI - GPIB-USB-HS cord, from a different testing machine, that I want to use to connect to the same analyzer

 

With the new computer and the NI cord, I can run the iBasic software, and the test loads, but errors when it runs. 

In the code it gives the error message on the line that says "ON TIMEOUT Scode,3" then GOTO the LINE that prints the error

 

I have installed the drivers for the NI GPIB cord, and even tried installing/testing the Agilent library Suite.

 

I'm looking for any ideas that someone may have to point me in the right direction, since I am currently stuck.

 

Thanks


I have two gpib-usb-hs devices; both of them work in MAX but only one will function in labview, help please?

$
0
0

Hi,

 

For my application I need to communicate with two instruments using two gpib-usb-hs devices. I am using Windows XP, Labview 6.1, MAX version 5.1 and NI488.2  version 2.42. I have checked and this ni488.2 driver should be compatible with my gpib-usb-hs devices and my versions of windows and labview. I have also tried older and newer versions of NI488.2 with no success.

 

I can communicate with my instruments properly in MAX, indicating to me that the devices themselves are functional. When I try to communicate with my instruments through labview (using the gpib example in labview), only one of the gpib-usb-hs devices communicates successfully. The other device returns the error EDVR: Error connecting to driver or device.

 

I am really not sure where to go from here. The only under thing that I found strange was that the working gpib-usb-hs had has a visa alias name assigned to it while the unworking device has none. I tried giving it an alias name but this did not help.

 

Any suggestions would be greatly appreciated. 

Paralell talking on the GPIB bus

$
0
0

Hi,

 

My system uses GPIB bus. I controll that using VISA libraries from LV.

 

One controller and ten devices connecet to the bus.

 

Can I have two session opened - one sesion per device - and receive (to the controller) the data from both of them simultanousely?

 

 

unable to change gpib interface id and primary address change with ni max using windowsw 7

$
0
0

I am using Windows 7. I have a GPIB_USB_HS adaptor and I can not change the GPIB Interface ID (Primary address). The NI max says you should be administrator to be able to change (while I am the administrator). The fields are gray and no access to change. 

I do not have this problem with the same adaptor when I use a PC with windows XP.

 

Please advise.

programable amplifier

$
0
0

Hi all,

actualy i want to control an amplifier by increasing or decreasing the gain depend on the out put,

I am using SR570 amplifier which include 28stage of sensetivity from 1pA to 1mA, and i am acquiring the out put by NI9222 data acquisition device.

at the begining i am selecting standard value for the senstivity, then if the out put with in some range of voltage ( 2 and 6), the selected senstivity will be used as default , else if the senstivity is greater than 6 the, that means the senstivity must be decrease to avoid amplifier overload, otherwise if the out put is lower than 2, the senstivity must be increase to insure enough out put amplitude.

this proceadure must be performed by increasing or decreasing one step of senstivity from the current senstivity.

my problem is that i can do that proceadure for only one time ( refer to the vi), because i couldn't find the better programing proceadure to increase or decrease senstivity by one step from the current condition. so can you share me some hint to solve that???

any help will be appreciated.

Thank you

Atmega32 and Labview data read and write

$
0
0

Hallo all


In my internship program I have to write a program to communicate Atmega32 with labview. In UART 5 byte is comming,

First byte is address byte
2 & 3 bytes are current values and 
4 & 5 bytes are temperature values. 

I wanted to display the current and temperature graphs and readings in labview. I updated basic serial read and write program and attached in this mail. Appart from this I made a communication RAW protocol using this link http://www.ni.com/white-paper/4478/en/ .

 My problems are 

 

I getting some random values from microcontroller. How can I read data from correct memory address? 
Is there any specific command to read memory address? 

 

Thank you in advanced

Probleme communication Pt1000 et MAX

$
0
0

Bonjour,

J'ai un probleme de communication entre MAX et un Agilent,
Je dispose d'un agilent 34970A, d'un GPIB et d'une carte insere dans l'agilent (34901A).
 
Avec MAX je communique avec "communicate with instrument" en language SCPI,
J'ai reussit a connaitre les temperature de mes Pt100 4 fils et des thermocouples dont les commandes sont:
Thermocouples de type J: MEAS:TEMP? TC, J, (@203)
Pt 100, 4 fils: MEAS:TEMP? FRTD, (@201)
 
Mon probleme est de communiquer avec la Pt1000 sur le port CH6
J'ai essayer:

         MEAS:TEMP? RTD, 85,1, 3E-06, (@206) mais on a par default la valeur d'une Pt100 2 fls

 

         Lorsque l'on configure la resistance avec TEMP:TRAN:RTD:RES 1000, (@206) cela fonctionne car si on lui demande TEMP:TRAN:RTD:RES? (@206) on a bien les 1.0000E+03 ohms. Mais je ne peut pas demander la temperature par la suite.

 

Merci d'avance pour vos reponse.

 

If you don't understand French I can translate.

 

 

how to use subset string on read visa

$
0
0

Hi everybody,

please help me, i have problem about how to pick some string on String indicator (Display Hex)

please see pict below :

HASIL.jpg

 

look at read buffer indicator, how to pick them one by one (Volt, Ampere, Watt, kVar, Cosphi) ? i wanna convert it to decimal. please help me

 

THANKS~


VISA serial port reading/ writing

$
0
0

hi, i'm writing program for microcontroller that using serial port for reading and writing data.

after boot, program must to wait 10 seconds to receive data from serial port

code: init serial port by VISA

//init of ssp protocol
        viSetAttribute (ssp, VI_ATTR_TERMCHAR_EN, VI_FALSE);   //disable termination char
	viSetAttribute (ssp, VI_ATTR_ASRL_END_IN, VI_ASRL_END_LAST_BIT);
	viSetAttribute (ssp, VI_ATTR_ASRL_BAUD, 38400); 
	viSetAttribute (ssp, VI_ATTR_ASRL_PARITY, VI_ASRL_PAR_NONE);  
	viSetAttribute (ssp, VI_ATTR_TMO_VALUE, 15000); //TMO 15 seconds
	viFlush (ssp, VI_ASRL_IN_BUF_DISCARD);
	Sleep(1); 

reading from the port

if (!strcmp(command,"readBuffer")) //Reading TST 
{
incount = 0;
otcount = 0;
viGetAttribute(ssp, VI_ATTR_ASRL_AVAIL_NUM, &num_bytes);
while(num_bytes <= 3) 
{
viGetAttribute(ssp, VI_ATTR_ASRL_AVAIL_NUM, &num_bytes); 
viRead (ssp, Databuf, num_bytes, &RTCount);


Databuf[RTCount] = '\0';

viFlush (ssp, VI_WRITE_BUF);
viFlush (ssp, VI_READ_BUF);
packetdata = strtok(Databuf,";");

if(!strcmp(Databuf, ";TST;") || !strcmp(Databuf, ";TST") || !strcmp(Databuf, "TST;") || !strcmp(Databuf, "TST"))
{

InsertTextBoxLine (panelHandle, PANEL_DEBUGWINDOW , ++debugBoxLine, Databuf); 
//*************** Auto Scroll ***********************
SetCtrlAttribute (panelHandle, PANEL_DEBUGWINDOW, ATTR_FIRST_VISIBLE_LINE, debugBoxLine);
flagout = 1; nboards++;
return 1;
}

 are this code optimal , can i change and remove while loop from the code?

and another issue when i'm writing to the port

code:

if(!strcmp(command,";ANALOG;")) 
	{
	     Sleep(1);
	    incount = 0;
            otcount = 0;
	    num_bytes =0;
	    strcpy(command, ";IN?;");
	    viWrite(ssp, command, 10, &RTCount); //10 bytes
	    viGetAttribute(ssp, VI_ATTR_ASRL_AVAIL_NUM, &num_bytes);
	    while(num_bytes < 11)
	    {
			if(num_bytes < 5)
			{
	         		  viWrite(ssp, command, 10, &RTCount);
			}
			viGetAttribute(ssp, VI_ATTR_ASRL_AVAIL_NUM, &num_bytes);  
			viRead (ssp, Databuf, num_bytes, &RTCount);
            }
		    viFlush (ssp, VI_WRITE_BUF);
		    viFlush (ssp, VI_READ_BUF);
			Databuf[RTCount] = '\0';
			packetdata =  strtok(Databuf,";");

 when program sending command ;IN?; it's gets some data. but sometimes buffer is empty. and i added while loop for checking num_bytes for received data.

 

may be i can remove this while loops and use some VISA attributes? for waiting received data?

 

 

thanks

 

preview serial buffer

$
0
0

Is their a way to preview a serial buffer? So that I can read its contents without flushing/clearing the buffer?

 

 

Agilent E4980A Measurement Speed and Data Acquisition Speed

$
0
0

I am using E4980A LCR meter, I need very fast data aquisition unfortunately limited by device own speed with 5.6 ms per measurement which means nearly 178 Hz. I am using usb interface with the software provided by NI, in that program I made some modification taking the reading side of the programme in a while loop .

 

To test my speed I start the program count 5s and stop saving the results to an excell file. If I plot the results in a graph while programme is working I have 60 Hz speed. If I don't, then it is 80 Hz which are far below the potential maximum speed of 178 Hz. If my lap top battery is very low then my speed is worse. But with no battery problem, my celeron laptop performance is the same as an i7 laptop.

Here it is my programme, it is the same provided NI but some modification. What can I do to have higher data acquisiton speed ?

 

Probably, USB's speed is not enough but I can not believe that while it can save gigabytes of data in a few min can't take 200 datapoint in 1s. Why can't I have 178 Hz speed now and how can I reach this limit ?

 

Regards.

GPIB USB HS

$
0
0

Dear

 

I am trying to use NI GPIB USB HS to control keithley 6487. When I use Measurments and Autmation Explorer, It sees the keithley and takes control. But when I use the Tools /Instrumantation/ Find instrument driver (in labviwe windwo), it tells me no connected instrument driver detected. I attach captures for both.  I am writing a code using ke485 driver but it does not communicate with the instrument. Any idea what I missed. I am using LabView 2010 evaluation edition. 

USB-232/2 shows COM ports but no VISA resources found!

$
0
0

Hi,

 

I'm using a NI USB-232/2 interface to connect my OMEGA Engineering temperature controller to computer. The temperature controller is communicating with computer via hypertermianl and the configuration software from OMEGA, but can not be detected by NI MAX. I attached a screenshot of my NI MAX. I could see both COM ports, but I can't do see the VISA test panel. 

 

My problem is similar to the post NI USB-232 problem!!! I tried the solution to uninstall and re-install both the NI VISA and NI Serial, but still not working. 

 

NI Labview 2009

NI MAX 5.6.0

NI Serial version 4.0

NI VISA version 5.4.1

Temperature Controler: Omega engineering CNi1644-c24

 

Have been talking to NI application engineer for two days, no solution yet. Anyone can help? Thanks!!!

 

 

 

 

NI-MAX Screenshot.JPG

Viewing all 5661 articles
Browse latest View live


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