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

Is it possible to use VisaNS without install VISA driver?

$
0
0

My program uses  NationalInstruments.VisaNS to control GPIB, now I have to install VISA driver in every PC before run this program.

Is is possible to abstract all requried Dlls or other files out with my application? Then I just need to release my application.

 


Instrument I/O Assistant (sending command from labview to arduino)

$
0
0

Hi,

I am a beginner in Labview. I would like to control the intensity of AC loads using labview. In this case, i would prefer to use instrument I/O assistant. The instrument I/O assistant in labview will have to send a command to Arduino. The intensity will be controlling by using slider in labview. How to write the vi for this example? Please advice.

VISA Library Handshaking over GPIB

$
0
0

I’m in the process of learning the VISA library and I have a question regarding handshaking. I’ve inherited some code that makes calls to viPrintf() and viScanf() and I’m encountering a latency issue when interacting with a Krohn-Hite 526  calibrator. For instance, when I run my code real-time, I have latency issues, but when debugging, the issue dissapears.Currently I’ve patched the issue by putting a 50ms delay inbetween the read and write, but for obvious reasons I’d like to eliminate it and patch it correctly. So my question is do the viPrintf() and viScanf() functions perform handshaking over GPIB/IEEE-488 or does that have to be done using other functions within the library? If anybody has some sample C code which performs the required handshaking, it would be greatly appreciated.

DLL Import - Integrating Keyence SI-F Displacement Sensor

$
0
0

Hi,

 

I'm attempting to use the import shared library function to integrate the Keyence SI-F displacement sensor.

 

I have the DLL files and relevant header files, however am getting errors on the function I wish to use (SIIF_GetCalcDataSingle ()    ).

 

The import only works for 9 of the 172 functions listed. Any help getting the import to work for the function named above is much appreciated!

 

The errors seen are:

 

EXP RC WINAPI SIIF_GetCalcDataSingle(IN int OutNo,OUT SIIF_FLOATVALUE_OUT * CalcData);

Undefined symbols can prevent the wizard from recognizing functions and parameters. To correct this problem, check the header file to determine if you must add preprocessor definitions. Click the Back button to return to the previous page of the wizard to add a preprocessor definitionsl (for example, "NIAPI_stdcall = __stdcall" or "NIAPIDefined = 1").
DECLSPEC_IMPORT;MAKEWORD;MIDL_PASS;SIIF_EXPORTS;UNICODE;WIN32;_WIN64;__cplusplus;

The following header file was not found in the specified header file or one of the referenced header files:
- pshpack4.h
- windows.h
- qos.h
- poppack.h

To fix, click the Back button to go to the previous page and add the header file path to the Include Paths list.

 

 

 

DLL and header files attached.

 

Thanks,

Marc

visa library objekt reference not listed in VBA under WIN7

$
0
0

Hi Community!

 

I have a VBA Script using the VISA32.DLL.

The Script includes the "VISA.BAS" and an object reference to "Visa Typelib" is set, its works fine with WinXP. 

 

Now I am trying to get it working with WIN7 (32Bit).

I installed the same Package Ni-VISA_5.3_full.

"Visa32.dll" is in the expected folder ( Windows/system32/ ..) but the "Visa Typelib" is not listed in the VBA Objekt reference browser anymore.  

 

 

Under XP there are registry entries like these:

 

   [HKEY_CLASSES_ROOT\TypeLib\{39C32428-25DB-11D0-85B4-0020AF33DEAE}]
   [HKEY_CLASSES_ROOT\TypeLib\{39C32428-25DB-11D0-85B4-0020AF33DEAE}\3.1] @="VISA Library"
   [HKEY_CLASSES_ROOT\TypeLib\{39C32428-25DB-11D0-85B4-0020AF33DEAE}\3.1\0]
   [HKEY_CLASSES_ROOT\TypeLib\{39C32428-25DB-11D0-85B4-0020AF33DEAE}\3.1\0\win32] @="C:\\WINDOWS\\system32\\visa32.dll"
   [HKEY_CLASSES_ROOT\TypeLib\{39C32428-25DB-11D0-85B4-0020AF33DEAE}\3.1\FLAGS] ="0"
   [HKEY_CLASSES_ROOT\TypeLib\{39C32428-25DB-11D0-85B4-0020AF33DEAE}\3.1\HELPDIR] @="C:\\WINDOWS\\system32"

 

With WIN7 there are none of such entries.

Un-and reinstalling the Ni-Visa Stuff does not help.

 

 

Locking forward for an expert recovering me from running crazy :-)

 

 

 

 

 

 

 

 

 

GPIB PROGRAM FOR TEMPFORCE

$
0
0

Hi all,

 

I want to write a program  to tempforce(temptronic) so that my program will control the tempforce like Compressor, Head up/down, heat and cold temperature.

please help me how to write the program its very urgent now.

 

thank you.

RS232 port on cRIO-9074

$
0
0

hello everybody !

I have a cRIo-9074, with on the frame a RS232 port. I try to use it but without success... I have alreadyinstalled NI Visa. But what should I do now ? When I create a new project, I don't find the serial port, and I don't find a tutorial for this...

Thanks a lot.

Simon M, beginner in Labview and cRIO.

I am looking for an oscilloscope with a Labview 7.2 version GPIB driver.

$
0
0

Any suggestions for a relatively low cost oscilloscope with a Labview 7.2 compatible driver?  Interface is probably going to be GPIB.

 

 

Thanks


Control motor direction using digital control

$
0
0

Dear all,

I am trying to control motor direction (forward and reverse) based on condition. I am reading data from two load cell left and right. 

Currently I am using radio button to control motor direction when stress read from load cell reaches at certain point. For example If I have a fixed cut off value for forward direction +20 as soon the value from load cell reach to value of +20 then motor start moving in another direction (reverse). I tried my best to explain my situation please ask me question if you need further information. I have attached screen shot of my programme. 

Thanks in advance

Install PCIe-6320 X into laptop

$
0
0

I have a PCIe 6320 X series DAQ card that I need to use with a W520 lenovo laptop. The PCIe card is meant to be installed at the PCIe port in the tower of a desktop, but I don't have that option. Searching for the correct adapters to use has been confusing. The laptop has USB, ExpressCard, and SATA USB ports available. Can anyone give me advice on what to look for?

SimpleStep motor controller board

$
0
0

I am trying to talk to the serial port on a SimpleStep motor controller board.

 

I am using NI-VISA through a generic USB-serial cable.

 

When using TeraTerm, I can manually issue queries and get responses.

 

However, when I run my LabVIEW 6.1 VI, I will get results 1 out 10 times.

The other times there are no bytes read.

 

I have tried having the serial port terminate on CR character.

I have tried not having the serial port terminate on anything and instead read the number of bytes at the port.

 

I am at wit's end what to try next.

Reading and frequency sweep on agilent 4980a

$
0
0

Hi all.

 

I newbie on Labview myself but always using this forum to answer all the problem that i had.

 

Currently I work at compression measurement and do the measurement of load cell and impedance at the same time. I use labview command that included when installing driver.

 

My problem is that I need to utilize agilent 4980a to read the impedance value on 1K and force value on load cell while probe is moving to compress the spesimen (I reach this step) but I need to add program to stop the probe and execute frequency sweep (and store it in additional file) without terminating the program it self to continue on each point I desire. When i see example program on agilent 4980a, Program to start frequency sweep is different and it's quite confuse me.

 

Is that any way to inserting frequency command on loop in labview?

 

I upload my flowchart.

 

THANK YOU SO MUCH

 

Ananta

Link VISA library with Qt

$
0
0

Hi,

 

I’m developing a GUI with Qt to control some oscilloscopes from LeCroy. For communication via Ethernet I want to use the VISA library.

 

I’ve written some code to test the communication channel but it just won’t compile. Here a short list of what I’ve already tried to make it run:

- copied project to C:\Temp to avoid space problems within the path

- used visa32.lib and visa64.lib

- copied libraries to the project folder

- linked libraries static and dynamic

 

The result or the copied library into the project folder is:

Fehler: No rule to make target 'C:/path…', needed by 'debug\KommunikationOszi3.exe'. Stop.

 

And the result with the “original” library is:

Fehler: error: Files/IVI: No such file or directory

Fehler: error: Foundation/VISA/Win64/Lib_x64/msc/: No such file or directory

 

The link commands in the project files are:

 lib within project folder

win32: LIBS += -L$$PWD/ -lvisa32

INCLUDEPATH += $$PWD/
DEPENDPATH += $$PWD/

 

lib in the original folder:

win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../Program Files/IVI Foundation/VISA/Win64/Lib_x64/msc/ -lvisa32
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../Program Files/IVI Foundation/VISA/Win64/Lib_x64/msc/ -lvisa32d

INCLUDEPATH += $$PWD/../../Program Files/IVI Foundation/VISA/Win64/Lib_x64/msc
DEPENDPATH += $$PWD/../../Program Files/IVI Foundation/VISA/Win64/Lib_x64/msc

 

And some code examples from my program:

Header file of the oscilloscope class

#ifndef LECROYWAVESURFER_H
#define LECROYWAVESURFER_H

#include <string>
#include <sstream>
#include <iomanip>

#include "visa.h"

class LeCroyWavesurfer
{
public:
    LeCroyWavesurfer(ViSession *defaultRM, std::string name = "", std::string ip = "0.0.0.0");
    ~LeCroyWavesurfer();

    // communication functions
    void write(std::string command, std::string logMsg);
    std::string read(std::string command, std::string logMsg, ViUInt32 datLength);

    // configuring oscilloskop
    void autoSetup(std::string channel);


private:
    std::string name;

    // for VISA-communication
    ViSession *defaultRM;        // connection to main VISA driver
    ViSession session;          // connection to device
    ViStatus status;            // communication status
    ViUInt32 retCount;          // retur count from string I/O

};

#endif // LECROYWAVESURFER_H

 

Some extracts frome the CPP file of the oscilloscope class

#include "leCroyWavesurfer.h"

/***************************************************************************************/
// Includes for code completion
/***************************************************************************************/
#include <QDebug>


/****************************************************************************************/
// Constructor
/****************************************************************************************/
LeCroyWavesurfer::LeCroyWavesurfer(ViSession *defaultRM, std::string name, std::string ip)
{
    this->name = name;
    this->defaultRM = defaultRM;

    qDebug() << "Connection to Wafesurfer" << name.c_str();
    std::string geraet = "VICP::" + ip;
    status = viOpen(*defaultRM, (ViRsrc)geraet.c_str(), VI_NULL, VI_NULL, &session);
    if (status < VI_SUCCESS) qDebug() << "Connecting to" << name.c_str() << "failed";

    qDebug() << "Setting time out for communication with" << name.c_str();
    status = viSetAttribute(session, VI_ATTR_TMO_VALUE, 500);
    if (status < VI_SUCCESS) qDebug() << "Setting time out failed";

}

/****************************************************************************************/
// Destructor
/****************************************************************************************/
LeCroyWavesurfer::~LeCroyWavesurfer()
{
    qDebug() << "Disconnecting from" << name.c_str();
    status = viClose(session);
    if (status < VI_SUCCESS) qDebug() << "Disconnecting from" << name.c_str() << "failed";

    delete this;
}

/****************************************************************************************/
// Writing command to oscilloscope
/****************************************************************************************/
void LeCroyWavesurfer::write(std::string command, std::string logMsg)
{
    // creating log message for debugging
    qDebug() << logMsg.c_str();
    qDebug() << "Sent command:" << command.c_str();

    status = viWrite(session, (ViBuf)command.c_str(), command.length(), &retCount);
    if (status < VI_SUCCESS) qDebug() << logMsg.c_str() << "failed";

}

/****************************************************************************************/
// activating auto setup for chosen channel
/****************************************************************************************/
void LeCroyWavesurfer::autoSetup(std::string channel)
{
    // command syntax: <channel> : Auto_SETup [FIND]
    // <channel> : = {C1, C2, C3, C4}
    // If the FIND keyword is present, gain and offset adjustments will be performed
    //  only on the specified channel.
    // In the absence of the FIND keyword, the normal auto-setup will be performed,
    //  regardless of the <channel> prefix.

    std::string command = "C" + channel + " : Auto_SETup FIND";
    std::string logMsg = "Setting auto setup for channel " + channel;
    write(command,logMsg);
}

 

Qt 5.2.1 runs under Win7. I have a user account not an admin account.

 

 

Does anyone know how to fix this problem?

NI GPIB-USB not showing up in VISA resource dropdown

$
0
0

Currently I'm using the NI GPIB-USB-HS to communicate with a YK1600 PM via custom VI's.  Last time I used this(2 weeks ago) everything worked well.  However, yesterday all communication attempts were unsuccessful.  Today, the GPIB device is no longer lided in my VISA resource dropdown in any of my VI's It's listed in MAX and scanning for instuments switches the PM to remote mode.  This would lead me to believe the GPIB-USB and PM are still functional.    

 

Any ideas???

Connect my Ohaus Scout Pro Scale to Labview without using the Print continuous setting

$
0
0

Hi there,

 

I am connecting my Ohaus Scout Pro Scale (Model 6001) to Labview.

 

My program can only read the data from the scale if I am in the print continuous mode or if I manually press the print button on the scale. But I only want to read measurements every 10 minutes and I don't want to press the button manually.

Therefore I implemented the VISA Write function and I am sending the command P\n (in \-comand). According to the Ohaus manuel this should be the same as pressing pring. But it doesn't work!!!

 

 

What am I doing wrong?

 

Is there someone else out there who is using Ohaus Scales and is able to directly read data from the scale?

 

Any help would be much appreciated! :smileyhappy:

 

 


lakeshore 331 temperature controller writing setpoint

$
0
0

Hello,

 

I am trying to interface with a Lakeshore 331 temperature controller via GPIB.  I was able to install the appropriate driver and simply read the temperature via the Instrument I/O Assistant.  I would like to of course control the temperature setpoint and heater power via labview as well.  However, when I select the write command I get a write input box in the Instrument I/O assistant box.  I tried to connect a numeric control to the "write" box.  However, I am still unable to write anything. 

 

Sorry if my question is too vague or simple.  I know pretty much nothing about labview.

 

Thanks a lot for your help. 

 

-Physicist

visa read more than 1 byte data

$
0
0

Hi, When i use VISA to read more than 1 byte data, only the first array got data, but i want to separate the 40 bits data into 5 arrays. Is anybody knows how to separate the data into arrays? Thank you for the reply!!!!

please explain error -1

$
0
0

I'm using VISA to read and write data on a 3rd party card.  I keep getting error -1 when I use VISA In 32.  What exactly does this mean?  I am using PXI Memory Allocations for my address space.

 

I'm running LV RT 10.0 with VISA 5.0 on a PXI 8106.

Keithey 2400 troubleshooting

$
0
0

Hey guys. I'm having trouble getting Keithley 2400 to communicate with LabView.

I already have Keithley 6220 running in the setup, so I tried just copying and pasting the code for it (not written by me, but it works just fine) and just changing the GPIB address, but that didn't work. I kept getting errors -113 unidentified header, and -102 syntax error.

Then, I wrote a simple program that would just turn Keithley 2400 on and source some current. See pic #1.

It still gives error -113, then -102, then turns on, but doesn't source current and "Compliance voltage" is flashing:smileysad:

I'm very new to this, so I'm not sure what I'm doing wrong.

I installed the new Visa driver for it and tried running programs provided by Keithley, but those also don't work. See pic #2.

Any help is greatly appreciated.

Impedance Data Scattering in EIS measurements on Solartron 1260

$
0
0

Hello! 

I am trying to measure Impedance of Polymer materials using Solartron 1260 as a standalone mode, and, I have nulled the Inductance effects by performing the short curcuit and open circuit measurements in the frequency rance 1E6-100Hz.

 

However, when I am meansuring the impedance data for the sample, All I am getting is the Scatter and, sometime the real component of Z' is negative!!  (attached a screenshot of the same)

 

Have anyone of you faced with situation, or, suggest anything to correct, or, let me know what I doing wrong?

 

Also, I have used the following connections,

 

INPUT = counter electrode,
GEN Out = work electrode,
Input V1HI = reference electrode,
Input V1LO = leave open, switch to single ended.

 

Thank you,


Sateesh 

 

 

Viewing all 5663 articles
Browse latest View live


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