Visa communication

Hiii
I am using VISA write.vi & VISA read.vi for writing & reading data from device based on RS232 TO 485 Modbus protocol.
My communication is working properly & i ma getting data perfectly.
My question is:
Is there any relation between VISA operation & OPC server during above communication?
vijtin
Solved!
Go to Solution.

Hi Vijtin,
Thanks for your post and I hope your well.
I am glad your setup is working well for you.
Why are you asking this question?
The modbus protocol can be used to link certain devices to OPC clients.
The Virtual Instrument Software Architecture (VISA) is a standard for
configuring, programming, and troubleshooting instrumentation systems
comprising GPIB, VXI, PXI, serial (RS232/485), Ethernet, USB and/or
IEEE 1394 interfaces. NI-VISA is the National Instruments
implementation of the VISA I/O standard. It provides the programming
interface between the hardware and application development environments
such as NI LabVIEW, LabWindows/CVI, and Measurement Studio for
Microsoft Visual Studio.
The National Instruments OPC Servers provides a single consistent
interface to communicate with multiple devices, saving you from
learning new communication protocols or spending time understanding new
applications. The combination of NI OPC Servers and LabVIEW provides a
single platform for delivering high performance measurements and
control to both new and existing industrial systems. NI OPC servers
connect through the OPC client in LabVIEW Datalogging and Supervisory
Control (DSC) Module to enable you develop a full fledged HMI/SCADA
system with PLCs, PACs and smart sensors.
So in summary, if you want to share your data from the modbus data to other OPC devices - then yes they can be linked. But if you've not configured anything then - then no. And VISA isn't used for OPC operations. 
Hope this helps, 
Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help!

Similar Messages

  • Input parameter setting when calling a DLL(Built from LabVIEW and a kind of VISA communication driver) in Teststand.

    In labVIEW7.1 I wrote a COM port communications driver by using "VISA Write/Read". I put a string as the input of "VISA Write" and made it the input of the whole vi. Then I converted the vi into a DLL, which is called in Teststand3.1 by specifying DLL adapter. In "Edit C/C++ DLL Call" dialog, I pass a message of "60 6A 94 80 86 81" as the input parameter. My problem is I tried three kinds of methods to pass the message, see attached 1.jpg,2.jpg and 3.jpg. and found the first one sometimes doesn't work, the second work fine and the last doesn't work all time. I don't know why the first one and last one don't work well.
    Thanks!
    Jacky
    Attachments:
    31.jpg ‏38 KB
    11.jpg ‏36 KB
    21.jpg ‏49 KB

    Hi Srinivas,
    Just another note, I noticed that the Math Interface Toolkit version (MIT) 1.0 is not compatible with LabVIEW 7.1. You’ll need version 1.0.1. of the MIT toolkit in order for it to work with LabVIEW 7.1.
    The LabVIEW 7.0 lvanlys.dll is also attached. I had to rename it with a .txt extension, so you’ll want to delete the extension.
    Kileen
    Attachments:
    lvanlys.dll.txt ‏516 KB

  • VISA communication problem

    Hello,
    In my application i have communicated controller with the labview via serial communication with USB Serial cable (using VISA tool). My application works perfectly fine in development mode and in.exe(without installer)
    Problem starts when I create the installer the communication starts malfunctioning. The communication behaviour is unpredictable. I have included different additional installer associated with VISA while creating my installer, the attached image shows it. Tell me if I am missing any additional installer. Some of the thread says that I should be having NI-Serial which is actually not listed in my case in the additional installer list.
    The problem is that my application on target device (which is not having labview) is not taking certain commands. Guide me with this please. Thank you
    Attachments:
    installer.JPG ‏101 KB

    Saumil wrote:
    Well....a littel doubt in my mind. I developed all the VIs on labview 2011, but by mistake I opened it in labview 2012 and made installer and everything on labview 2012 only. Does it have to do anything with this?
    In my experience, there is little risk in updating your VIs to a newer version; it's when you go backwards that you begin to have issues.  That being said, maybe There are some options that are different between the two LabVIEW versions?
    I know it's too late for this project, but have several versions of LabVIEW on the same (Windows 7) PC, and I've opened up projects in the wrong version even though I selected the project from the --> menu from the correct LabVIEW version on the Start Menu.  It seems that the shortcut will open in the last version of LabVIEW that you had open, even if you did what I did above.  Now I explicitly open the correct LabVIEW version and select the project from inside LabVIEW instead.
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • Visa communication time via ethernet - very slow?

    Hello Everyone,
    I am working with an Anritsu MS2722C Spectrum Analyzer and attempting to recieve as fast a communication time as possible.  So far, the visa function calls I make  ( viPrintf / viBufWrite  viReadStr / viBufRead ) seem to be taking roughly 100ms each, much too slow for the project I'm working on.  
    Does anyone have ideas as to how I can speed up the communcation time to the device in software?   It seems like maybe I am missing something in maximizing the efficiency of the VISA library, as it seems to me that the communication time should be much faster than this.
    I'm sorry if this question is in the wrong spot or has been already answered, but I didn't see much discussion about library efficiency anywhere.
    Thanks,

    Hi Ever Song,
    Thanks for the response!  The real problem I'm having isn't so much with the data transfer rate though, the speed at which the actual data transfer happens is fine (if I were to say, transfer a large file, the operation completes in say 130ms .. only 30ms longer than making a simple call with very little data transfer).  So while the jumbo frames are a decent idea, that's more of a low-level speedup for data transfer rates, and I'm not sure it will really help me
    I'm speaking in terms of VISA library overhead, or some sort of overhead from establishing a connection, as sending even the simplest command is taking around 100ms.  (the call itself blocks for this time).  If anyone has had any experience with using the visa libraries (particularly with a spectrum analyzer) I'd really like to hear about what kind of communication times you were able to achieve.
    Thanks,
    ~Chris

  • MODBUS-RTU connection with aleatory VISA communication fails

    Hi everyone,
    I have a big problem that I'm trying to repair since a pair of months. I have a MODBUS gateway connected to my pc via RS-485 in RTU mode. The physical implementation is based on Ethernet cable, so I have two connection converters in both endings of the Ethernet cable that wire each line to its corresponding terminal in a RS-485 connector. On the side of the PC i also have an electronic card to convert RS-485 to USB for connect using a USB port for pc's connection. That card is the model USB-COM485-PLUS1 from the company FTDI chip. I have installed on my PC the drivers of the card that configure a virtual COM serial port for my RS-485 communication. On labview I have programmed my interface for communication using a MODBUS library that was installed previously on my PC (I am using my company PC, because i have this problem on my workplace).
    The problem is that, usually, my system works correctly, and the communication is perfect. I read always the holding registers of my gateway, and i can write the control registers without problems, but, some times, the connection spend more time without communication that reading, and after some hours in that conditions, it fall in continuous fail and doesn't work any more since the next day. That problems persists even if i restart the PC or shut it down for a while. By the other side, I realized that when the communication falls it only fall on the reading wire, because even if the reading communication is with continuous fail, i can write on the corresponding registers of my gateway.
    I'm sure at 80% that the gateway runs correctly, and I have other installation similar with the same gateway, cable, connections and card working correctly. I tried changing the Ethernet cable, changing the RS-485 to USB conversion card and only when i changed my PC, the problem disappears. So I thought it was a problem of the PC. But some time after I changed the PC, the problem returned. After this, I continue making probes and actually I have the theory that it may be a problem because i have other communications running at the same time in my labVIEW app. I think it may be a problem of incompatibility of drivers or a bridge over different communications that make it fail. Because the pc's where this error disappear has not installed NI RIO drivers.
    My LabVIEW program also have a communication via Ethernet with a NI cRIO 9076 chassis. That chassis has a module for PROFIBUS communication, also has a module for thermocouple inputs, a module for voltage inputs and other for voltage outputs. All this modules work correctly always. My theory is that some of this other modules in NI cRIO 9076 chassis may cause a conflict that make my system works wrong. Other things that seems me annoying is that i bought recently a new conversion card for RS-485 to USB connection and it doesn't works on my system, I have other two identical cards and they work correctly, and i know that the new card works also in other systems i have.
    The issue I don't understand is that this problem doesn't happend many times and it seems to be aleatory... The fail that the labVIEW return when it can not read the holding registers is a timeout error because of a frame error. It would be illuminating for me if that error where periodic or systematic, but occurs only a day every two or three weeks and the rest of time works properly. But on my company, when this installation will work continuously, it can't have any day of non-work.
    So, please, I need help with this Issue, I'm lost int he way of resolving it. Thanks only for read this large post.
    Regards, 
    Joaquín
    PD: Please, don't damn my English, it is not my mother tongue, I'm spanish.

    First of all, thanks for your quick reply.
    I had the USB port save power mode enabled. I have disabled it. Actually my system works correctly so I can't know if the problem has been solved, but i have a new converter card for RS-485 to USB and it doesn't works, i have other two that work properly but the new only writes, just like when i have the problem commented. So, I think that if i solve the problem with the new card, i can be sure that I will have solved my connection problem. The new card is configured with the same options that the others, except by the port number, i configured COM 3, COM 4 and COM 5 respectively.
    By the other side, when I said that I think cRIO interferes in MODBUS communication I mean that the only things that changes in PC's that correct the problem are that they have not installed the FPGA module or the RIO drivers. And once i changed my PC, the problem was solved since I installed this module and drivers, moment when the problem reappeared.
    Thanks again

  • VISA Communication with Slot 0 Computer

    Hello,
    I am trying to see if a VXI Computer is up and running and maybe do a few simple commands like DIR and a memory check to perform a self-test on the VXI Computer. This is the hardware I am running with:
    (2) VXI Chassis each with an XP OS
    (1) Sun Solaris computer using VISA Server commands to interact with instruments in the VXI chassis
    So, my main commands are coming from Sun. I can open a VISA session to the PC using something like this as the address:
    visa://ip address/VXI0::0::INSTR
    But from there, I do not know if commands can be accepted. Any help would be appreciated or if someone has a better way to get info from a remote PC.
    THanks,
    Michael Froehlich

    Craig H. wrote:
    Michael,
    I think I need to try and clarify the question a bit. You have two VXI chassis with two VXI controllers. You have a Sun Solaris computer and are using VISA on that machine to send commands to one or both of your VXI controllers.
    Now you can't send VISA commands telling the controllers to do anything. Controllers don't act like instruments in the sense that you open a VISA resource and communicate, so looking at the directory structure of the OS on your controller can't be done using VISA. Are these NI controllers by the way?
    Craig H.
    ps. you will probably have more visibility posting this to the VXI/VME discussion forum, not LabVIEW.
    Your assumptions are correct. I have 2 VXI chassis with NI VXI PCs in them. I am trying to talk to these controllers/computers without having to use a looping function on the NI VXI PCs. I would like to use the NI VISA server but the only thing I can use that for is finding out all of the devices available on that VXI chassis. I did find a way around this using a TCP listening on the VXI PC and sending a system exec command SYSYTEMINFO and sneding back the information to the SUN but I thought there mught be a cleaner way to do it with NI VISA.

  • Queue handle interference with visa communication

    From time to time I get an error message from Labview with Error #1 on an Release Queue subvi (invalid parameter). How can this be?
    Hint: I have a straight connection from Obtain Queue to Release Queue, I dont use globals for the handle.
    Can the handle be destroyed somehow?
    Best regards,
    GerdW
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

    I will assume you are using LV 6.1 or later. (Note Queue references changed between LV 6.0 and 6.1 in that each obtain queue returns a unique reference now. Previously the same reference was returned.)
    The Release Queue will destroy the queue and invalidate all reference to the queue if the "force destroy" boolean is true.
    I suspect that elsewhere in your application, there is a realease queue being called that has this input wired true. I also have to guess that the destroy is occationally executing between when you obtain the queue reference and when you release it.
    The attached VI (in LV 7.0) and jpg illustrate this condition and return the error code 1 as you mentioned.
    Run the VI in exection highlihting and you will see how this hap
    pens.
    BTW
    If you are seeing this in RT, I have another story that applies in that environment.
    I hope this helps,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    destroyQue.vi ‏30 KB
    destroyQue.JPG ‏20 KB

  • How do I correctly time while loops using SCPI and VISA/Ethernet communication to send DC current Values to a Power supply?

    I'm rather new to using labview and I having an
    issue with a test Data Aquisition lab I'm trying to setup using a
    Keithley 6221 AC/DC current source and a basic PCI M-series NI-DAQmx. 
    First of all, I'm looking to update the  current value on a power
    supply at a rate of atleast 10Hz and I'm using SCPI commands and VISA
    communication through ethernet to do so.  Attached below is the VI I
    have written. 
    The issue I'm having is this:
        My VI will
    loop through the values fine in software, or so it seems.  I am unable
    to get the Power supply to update sequentially if I don't set my loop
    delay to anything greater than 130ms.  If I try to run the loop faster
    it starts skipping values instead of counting 1,2,3,4,5,1,2,...etc.  it
    goes 1,2,4,5,2,4,1,2 on the display of the power supply and my DAQ unit
    also skips these values so I know that the number just isn't getting
    read to the Power supply in time.  I was wondering if this was due to
    my sloppy programming or if it is a hardware issue, my computer or the
    method of communication to the power supply?  Is this due to the fact
    that I'm using ethernet and VISA communication?  Is there a faster way
    to communicate or is GPIB faster?  Any input at all would be extremely
    helpful.
    On a side note:  Right now I'm using an pre-determined
    array of values that I can update on the fly but in the future this
    with be put into a  closed-loop control system.  The value for the
    power supply output will be determined by the loop and sent that way.
    Attachments:
    basic DC loop 6221 Keithley.vi ‏145 KB

    Also, one of the string constants is NOT set to '\' Codes Display. Here is an alternative method of calculating the index. I removed the DAQ and VISA stuff since I could not run it.
    Lynn
    Attachments:
    basic DC loop 6221 Keithley.2.vi ‏16 KB

  • How can i write a sign string in VISA Write?

    Hello everybody.
    I would like someone to help me. I have an
    array, which is transformed (by Byte Array to String) in a string that
    reaches the VISA Write Serial Port. My problem is that when making the
    transformation with Byte Array to String, i  lose all the bytes with sign
    (negative).
    What can I do? I don't want to  lose the sign bytes and be able to send them to VISA Write Serial Port.
    Thank you very much.

    It sounds like you have a typecasting problem.  First, why do some of your bytes have a sign?  I assume they are I8.  Strings are based on U8 because they are just a series of ASCII characters vs. values.  The ASCII character table goes from 0 to 255.
    What happens on the other end of the VISA communication string?
    One thing you could do is to typecast your bytes to a U8.  Though I think the coercion dot of an I8 byte array going into the byte array to string is doing this automatically.

  • Link VISA library with Qt

    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?
    Solved!
    Go to Solution.

    I don't know why, but with a direct path it works. Should look like this:
    # Library for VISA functions
    win32: LIBS += "C:/Program Files (x86)/IVI Foundation/VISA/WinNT/lib/msc/visa32.lib"
    If you also add the include folder you don't need to copy the visa.h into your project folder.
    INCLUDEPATH += "C:/Program Files/IVI Foundation/VISA/Win64/Include"
    DEPENDPATH += "C:/Program Files/IVI Foundation/VISA/Win64/Include"

  • How pass VISA resource string from C++ as uintptr_t* to a LabVIEW generated DLL ?

    My coworker build a DLL from LabVIEW that I am trying to call from C++.
    void__cdeclMeasureDCvolts(uintptr_t*VISAResourceName, int32_tChannelNumber,LVBoolean*MonitorResult,double*MeasuredVoltage, TD1*errorOut);
    Does "extcode.h" define macros or functions for string conversions?  Or should I request my coworker rebuild the VI's to make arguments more C/C++ friendly?
    Thanks in advance for any tips or direction.  Examples are * much * appreciated.
    -Ed
    TestObjectMeasurement* testObjectMeasurement = m_measurementMap[name];
    TestObjectInstrument* testObjectInstrument = m_instrumentMap[selectedInstrumentName];
    int slot = 1;
    int bank = 1;
    int channel = 1;
    int channelNumber = 1000 * slot + channel;
    char * visaResourceName = testObjectInstrument->visaResourceName().toLatin1().data();
    LVBoolean monitorResult = LVBooleanFalse;
    double measuredVoltage = -1.0;
    TD1 errorOut = {0};
    try
    // void __cdecl MeasureDCvolts(uintptr_t *VISAResourceName,
    // int32_t ChannelNumber, LVBoolean *MonitorResult, double *MeasuredVoltage,
    // TD1 *errorOut);
    MeasureDCvolts(reinterpret_cast<uintptr_t*>(visaResourceName), channelNumber, &monitorResult, &measuredVoltage, &errorOut);
    catch(...)
    qDebug() << "Exception thrown by: MeasureDCvolts";
    QString errorSource = QString::fromUtf8(reinterpret_cast<const char*>(LHStrBuf(errorOut.source)), LHStrLen(errorOut.source));
    qDebug() << errorSource;
    LStrHandle errorTextHandle = {0};
    bool foundErrorText = NIGetOneErrorCode(errorOut.code, &errorTextHandle);
    if(foundErrorText)
    QString errorText = QString::fromUtf8(reinterpret_cast<const char*>(LHStrBuf(errorTextHandle)), LHStrLen(errorTextHandle));
    MessageHelper::messageError(errorText, errorSource);

    Why is it not a solution? It was exactly about what you wanted to do and the solution in the last post is how it can be made to work. There is NO way to ddirectly create a LabVIEW native VISA resource in C code that is not called from within LabVIEW, unless you consider hacking the LabVIEW system and using undocumented functions a solution. But that has very good chances of breaking with future LabVIEW versions.
    Your only other option is to export another function from the DLL that accepts a String and uses VISA Open to explicitedly open the VISA session in your LabVIEW DLL and returning that VISA session to your C code. This is functionally equivalent to passing a String to your current function but avoids the lookup and potential recreation of the VISA refnum on each call. Something I would only feel bothered if you intend to call this function many thousend times each second, which for VISA communication seems very unlikely.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • GPIB error in the instrument while no communication error

    I am developing a test system by connecting several measurement instruments through GPIB with LabVIEW 6.i. The driver is written by using VISA command. GPIB control card is NI PCMCIA. When using laptop everything runs fine. When using an old PC with something like EISA to PCI converting card for slotting in the NI PCMCIA card. One instrument always displays an GPIB error. The error is instrument specific, no further detail is given by the manual. When the error comes out, no GPIB or VISA error exists. If only the driver for this instrument is installed so that the software only communicates with this particular instrument, no error. With other driver installed, there is no error in the first or two commnunication
    . Later on the error is surely out and display in the instrument screen only. Once again, no any other GPIB or VISA communication error. Anybody can help on this ? Thanks a lot.

    Hi JLS,
    First of all, thank you very much for your prompt response. I am not sure some of your questions because our hardware engineer is away for a week. I am trying to explain what I know and see whether you could help to figure out the reason.
    0. The operation system in the old PC is Win98. The CPU is PII 350MHz, 32G Hard disk and 320M RAM. The reason why we are using the old PC is that we have a 3rd party motion controller. Its control card is a ISA card.
    1. The conversion device is a kind of card, put in the ISA slot in the PC extention I/O bus. We can slot in 2 PCMCIA cards in the conversion device. The driver for the NI PCMCIA card is supposed to be the same with that in laptop.
    2. The driver that works with the instrument is developed by me by using NI-VISA. The instrument is a signal generator (SG) from Marconi instruments. Basically what the driver does is to turn on or turn off SG and read back its on-off status. When turning on SG, send setting frequency and signal level data as well. The calling of the driver is in a loop where frequency is stepping up.
    3. There are other measuring instruments. e.g. electric field monitor probe to get the electric field strength etc. All these instruments' driver are developed by me by using NI-VISA. I also develop a set of dummy driver for all the instrument for demo purpose. Dummy drive did not communicate with instrument, inside, control is directly wired to status. When all other instruments except SG uses dummy driver, The running is OK. No error is displayed in the SG screen. If I use any of the other instrument's driver with that of SG, there is no problem at the first run (that means at the beginning of the loop), problem surely comes out later on. But it is OK when running in the laptop of which the OS is Win2000. The funny thing is if I takes out the status readback in SG driver, there will be no error at all even running with other instruments' driver in the old PC. I have compare through the GPIB card setting in the old PC and laptop, make sure that the EOI setting, primary address, EOS etc. to be the same in the two computer. It does not work.
    4 & 5. The error displayed in the instrument screen is Error#403 "Data Expected". The manual said it is caused by the GPIB programming wrongly. No further explaination on how it may happen. Even there is such error display, no any GPIB or VISA error happens in my driver, the error cluster is clear. I debug the problem and find that the SG error appears when executing VISA resource open. I have also checked through all the NI GPIB help. It seems I could not find the answer.
    6. I am not sure how to check the version of NI-488.2 and NI-VISA. NI-VISA is installed with the LabVIEW 6.i together.
    Best Regards
    Jason

  • VISA port spy

    Is there a way to programmatically monitor a serial port (without taking control of the port or otherwise interfering with an existing connection)?
    I know I can use third party applications like Portmon, or NI IO Trace to display (VISA) communication in the NI IO Trace application, but I would like to create my own "terminal window" in LabVIEW to display all messages.  NI IO Trace has a LabVIEW API to start and stop IO Trace, but no API to programmatically access the data stream.

    Dennis,
    True (for TestStand).  Likewise, in LabVIEW I could send a Notification (or some other communication mechanism), but the key is that I would have to modify each VI that does a VISA write or read.  I would like to do essentially what NI I/O Trace does--display what VISA messages are being sent and received without the application doing the sending/receiving having to know that it is being montored.  If NI I/O Trace provided an API to programmatically access what it is seeing, I would be in good shape; but (as far as I can tell) it doesn't.
    There are lots of tools out there that spy on serial (and other type of) ports (at a lower level than VISA), but they all seem to be stand-alone programs that are the equivalent to NI I/O Trace--they display and capture the traffic, but don't provide an API.  The next best thing is to figure out how all these tools are using low-level Windows calls, but that seems daunting.

  • How to code this with serial communication?

    Here's What I Want To Do.
    There are two computers A and B. I send some variational data, 1.2,3.4 for example, from A to B once per second. If B has received the right data, he will send "Yes" to A, otherwise he will say "No". If received "Yes", A will get ready for the next data-sending. If "No", A will send the data again.
    The examples with LabVIEW for VISA communication are all like that one computer is listening and the other one is writing all the time. So can you help me with two simple VIs for computer A and B?
    Regards.

    You need to connect the two computers' serial ports with a Null Modem Cable (Tx/Rx, CTS/RTS, DTR/DCD reversed). The put the attached vi on computer A. It will send a command from an array, and wait for a response from computer B. If the response is Yes, then the next command will be sent. If not Yes then A will send the same command again and wait for a response. There is an Abort button if you want to abort, but it will only abort the current command. You can modify it to abort the whole thing by using a while loop to replace the for loop, and using the abort button to exit the while loop. I'll leave the coding up to you. You will have to write a vi to reside on B. I'll describe it but you can code it, good practice. Computer B should start off initializing the com port, like in the attached vi. Then loop at Bytes at Port until some bytes come in, then read the bytes. Use a comparison (equal) to check if the data is good. Use a case structure to define what to send back to computer A (Yes or No). Then write it back using Visa Write. Loop around the entire thing except for the com port init. Close the Visa after the main loop.
    - tbob
    Inventor of the WORM Global
    Attachments:
    COM_AtoB.vi ‏50 KB

  • Serial: VISA or not?

    What are the differences to implement serial comunication with VISA Serial
    or normal?
    more precision? Less errors?
    Thanks
    Dery

    Carola Celeste wrote:
    > But what is the best way (the faster) to permit LabVIEW to comunicate with a
    > microcontroller, by RS-232?
    > VISA or VIs?
    I'm not sure I understand your question. Fast in terms of development or
    in terms of communication? Development would mostly depend of what you
    already know. I prefer VIS because I know it quite well. As far as
    reaction time to VISA communication is concerned I would say there is no
    real difference even nowadays where the Traditional Serial VIs in fact
    go through VISA anyhow when you go into the VIs and look deeper.
    The only thing which would be really faster is directly programming the
    serial port chip on register level through a device driver for the
    device you want. But device driver developme
    nt is a tricky business and
    there is no way to do without C programming, low level system debugging
    and such, so I'm quite sure it is not what you are looking for.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

Maybe you are looking for

  • Deleting Master Data

    Hi All, I am trying to delete master data in a process chain. But its not working , the chin is executing but the function module RSDMD_DEL_MASTER_DATA is retuning the message " No master Data was Deleted". Please suggest how to fix this. Appreciate

  • Does the number of photos stored on the Ipod touch affect the quality of photos

    My IPod touch had started out taking great photos, but over time I ended up storing well over 500 photos on it. Recently I noticed that my new photos are of very poor quality (fuzzy) could this be due to the volume of photos stored. I can easily dele

  • Internationalization in Adobe Interactive forms

    Hi,       I have a scenario to make an internationalized application using adobe forms, where i send a request to a bapi which sends me the result in my local language. this scenario works fine in the webdynpro screen i.e in IE. When i try to display

  • Cannot open files on the network server.

    Folks: I have a user running Acrobat X Pro.  The program works fine in all respects except one:  When he tries to open a PDF that is on the server, he gets an error message: "There was an error opening this document.  This file cannot be found." He h

  • Has anyone received their C2D MBP with 3GB RAM?

    For those that have ordered a 15" C2D MBP with 3GB of RAM: a) have you received their order yet, and if so, did it take a while to ship (mine's taking forever to ship); b) do you feel that the extra 1GB was worthwhile paying for in terms of performan