Communication series

Hello

I'm using communications series VISA in my vi to communicate with the hardware. My laptop has two COM COM1 and COM2 ports. I'll be using VISA configure a serial port to set specific Com Port.

COM port will be indicated by using the name of resource VISA. I should know the status of com before another operation takes place. IE say I chose com2 on behalf of the resource for the COM port configuration, but I connected the hardware serial cable on COM1. How can I know the difference? I tried the line of the error checking, but unfortunately his does give no error since the COM1 is present in the laptop.

Thanking you,

sushmith

Hello

The idea would be to write * IDN? (or you can select the order based on the expected answer your device connected to COM port) command individually, to the COM port

This should return the identification of the unit (or a known response) of the device connected to the COM port when trying to read the data for the number of available bytes to the port.

If the returned string is empty (or not the expected answer) then that would mean that no device is connected to the COM port.

Tags: NI Software

Similar Questions

  • Communication series with Mettler Toledo 205 XS

    Hey guys,.

    I'm in the process of establishing a communication series between my PC and a microphone Mettler Toledo (XS-205) balance. The Balance is connected via an RS 232 cable to the adapter USB TU-S9, then to the PC. I do not see the port in the MAX of NOR and via the test Panel, I put the configuration of the communication according to those of my balance:

    BD rate: 9600

    Bit\Parity: 8 / no

    Stop bits: 1

    Handshake: no

    EndofLine: LF

    CharSet: Ansi\Win (only within the balance)

    Continuous mode: OFF ("");

    now, the fact is that if I try to query the command * IDN? \n I get as a response

    1: write operation (* IDN? \n)

    Back County: 6 bytes

    2: read operation
    Back County: 17 bytes
    S\sS\s\s\s-0.0006\s\sg\n

    with an error in the data returned (Hex 0xBFFF006C). I also tried to use the script provided by the site OR Mettler-Toledo scales, but I get all the data and at the end of the routine, I get error VISA: (Hex 0xBFFF0015) timeout expired before the operation is complete.

    Everyone as an indication of what's going on? Thank you much for the help

    See you soon!

    Thank you guys for the quick responses.

    my mistake. Mettler Toledo balances does not accept the SCPI standard commands, but they have their own defined standardized command.

    Thanks anyway

  • Writing of multiple orders with communication series

    Hello

    I'm quite familiar with the basics of LabVIEW, but I'm new to communication series with VISA. I had no chance of finding a solution to my problem, but it is similar: http://forums.ni.com/t5/LabVIEW/VISA-read-write-to-serial-port-Unable-to-impelement-multiple/td-p/93....

    I am able to send a command and read the response with the device, but I can't send several commands to change the settings of the device. For example, I send 'F' to the device to read the current operating frequency and read the response (22). But if I send 'f' to the device to change the operating frequency, read the answer ('send frequency... (''), then send my desired frequency (120), I get no response.

    The default frequency at the opening of the port of the unit is 22. I would like to change the frequency to 120, then read the current operating frequency to ensure that it was indeed changed.

    I'm confused about the format of data to be sent in LabVIEW. In MatLab, it works fine if I send 'f' as a character (fwrite), followed by the desired integer frequency. However, in LabVIEW, it seems that the number I want to send is not read correctly. I have tried to cast the integer to a string and read that the slash code, hexadecimal, normal code, all I could think about.

    Help, please

    This give a try. Press the button "Prepare", followed by the 'Set Freq' button. You need to configure your serial port properly first well.

  • Management communication series through liaison camera card

    I have a card OR cameralink and want to handle the integration of a camera time using the controls of the camera series.  Is it possible to place orders of series using other software like MatLab (heresy I know)...

    My experience using MATLAB is absent, but if you can call the C API for IMAQ, then you should be able to do.  You can take a look at the help of the reference of the NOR-IMAQ function and specifically examine the functions of Communication series under features low level.

  • That engine run time is necessary for communication series build Setup

    That engine run time is necessary for communication series build Setup

    You need NI-VISA. If you are using a National Instruments serial port card or device, then you also need OR Serial. All software can be found in the Technical Support page.

    Obviously, you have also the runtime for the software development environment itself as well. For example, for LabVIEW, you need to the LabVIEW Run-Time.

  • Web interface and communication series

    I just started reading on the user Web interface. It seems useful, but I could not, how do I connect an application user Web interface with some series/USB instrument, for example. Is it possible to have VISAS screws normals and other toolkits within the user Web interface? Or maybe, it would be possible to develop a stand-alone application using LabVIEW (and all the screw and tool boxes that I am used to), and then import into the user Web interface?

    Thank you

    Marcelo

    That's basically correct - LabVIEW code cannot be imported and you can not directly interface with hardware - and is the only authorized communication with web services (LabVIEW or otherwise).

    So if you have any material you want with the Web Interface Builder interface, you will need to build a web service of LabVIEW that outlined some of the features and then consuming the Builder UI with the functionality of the Web Service to import.

  • communication series with VISA

    I'm trying to communcate with a power supply via a serial connection.  Communication works very well in Hyperterminal and putty, but I can't seem to run in labview.  It times out when trying to read the data.

    Hyperterminal parameters are the basis of everything and it works fine

    9600 baud

    8 data bits

    no parity

    1 stop bit

    no flow control

    Send "VOLT?" with CTRL + J for line break

    Returns under the voltage at the output of the UUT.

    I wonder if I send you the incorrect order in labview.  Any help would be great.  I have attached the VI, it's my first try at comms series so it's pretty baisc and I do not know I'm missing something

    You are not sending the line break.  You send only "Volt"?

    Make a right click on the string constant, visible display style and make \codes show.  Then enter \n at the end.  Now you send VOLT? with the line break.

    In addition, remove the shift regsiters on the son of reference and error.  (A single time-out error will keep your VI to run again until you stop and restart the VI)

    And put a close VISA outside the loop.

  • Reading loop DAQmx only reaches the speed of Communication series

    Hello everyone,

    This is my first post in this Forum. I have a program with 4 loops, 2 separate and 2 connected by a queue. The first loop (see attachment loop PID) runs at maximum speed, the second a (serial communication) works at maximum speed (very slow because of the speed of series).

    To find the error I deleted from the queue to get 4 separate loops. The loop with the calculations (calculate loop) now also runs at the maximum speed, but the analog read loop just past the loop of serial communication speed. On the inside of the Sub - VI is just the configuration for the DAQmx with internal sampling. I have no connection between the loop of serial communication and analog playback loop. Is it possible that the DAQmx is slowed down because of the serial communication? Serial communication also uses a windows DLL.

    I hope you can help me.

    Best regards

    Jannik

    Thank you for your quick response. I found the answer, I guess that: I deleted the Subvi and the use of the DAQmx in the loop directly, it has worked. I think that the Subvi took too long because of the additional options to run at 1 kHz.

  • USB-problem of communication series

    Hello.

    I am trying to contact a module of mscf-16 mesytec via usb (usb smart series converter of fdti). Using hyper terminal I can connect and send commands to the module and labview, I can't use commands. It's like the same sense of module to return a string that I write.

    Y at - it any incompatibility between the fdti and visa vcp driver?

    HyperTerminal sends a CR and LF with every order. You ship only LF - the \n. In MAX, try adding \r\n. The \r is carriage return. In LabVIEW, you need to right-click on the control of the chain and select '-' code display or use the palette of the string constants.

  • Communication series with ANSI emulation

    I have a mass flow of gripper controller that uses a connection set to read/write.  I have the connection works in hyperterminal, but we are updating our computers and do not use more serial ports.  I have a cable USb232 and now trying to establish the connection through labview.  There are several required specific hyperterminal settings to get the device to communicate that I can't find in the settings of labview.  The device requires:

    1. 19200 bauds, 8 bits, no parity, no flow control (not a problem, can adjust these settings)

    2 terminal emulation must be set to ANSI

    3. under the ASCII Configuration

    Send line with line breaks ends is NOT enabled

    The echo typed local characters is turned on

    Add RSS to finish lines is running

    When I connect through the serial.vi base, I get a time-out error and do not have all the data of the device.  In hyperterminal, the news on the device are questioned by sending 'A' to the device.  Any help for this communication device would be appreciated.

    Thank you

    Problem solved, I just to activate the writing of the end and read with characters of endpoint and the hexadecimal value on D.

  • concatenate the hexadecimal code set by the user for communication series

    Hello.. I'm a newbie to LAbView. I am trying to contact a power supply Source. for which my order will be in the format of 4 to 5 bytes; for example, to set a voltage of 220 VAC, it's 1509 0898 in hexadecimal, 15 of which is binding for all orders of shaky writing, 09 for various operations such as setting Volatge or FREQ. and last four digits 0898 is a 2200 (by 220.0VAC) hex code.

    By sending the complete command 1509 0898 in hexadecimal Serail port communicating my source, even in the giving them using string concatenation as 1509 is the first chain and 0898 in second, it works fine.

    But these last two bytes would be defined by the user and can therefore vary in digital, so I put a number of Hex code conversion there before concatenation. who does not send the code Hex 0898 as reqd.  but this garbage to send value... 3038 3938

    Help, please... Thanks in advance...

    Ermani salvation,

    Here is a step by step journey:

  • Method of getting the 2 values simultaneously using communications series RS232C

    Hello

    I'm new on OR / LAB Windows CVI. What I have to do just that:

    Only I have to read 2 values simultaneously in 2 different digital Panel using the RS232C serial communications, which are connected with sensors and after each equal time interval I read this (assume that I pressed start button and data comes in digital Panel then I'll press the button stop and note the values and then press the Start button and next value will come on signs).

    Can you please suggest me the steps in this process.

    ANY HELP WILL BE APPRECIATED

    Thank you


  • Problem of communication series, ASRL end in zero votes and TermChar Enable false does not stop 0x0A character

    Hello

    I got in touch ok using VISA series read/write with a patient monitor and have almost finished getting all parameters in need of the monitor; However I am stuck now and is missing a value which is coded 0x0A.

    I googled and found that it is probably the message after this character, also yes I get the first 6 bytes or more.

    I subsequently put TermChar Enable false and end ASRL in None on the property node to read but still missing the additional (after the 0x0A) byte I need to calculate the necessary pararmeter.

    The attached picture shows the run configuration of VISA before the outside/front of the first major loop, then an inner loop where reading occurs. It seems that, even if I think I'll get the right pieces of the node property, I can't stop the playback stop character.

    Here, any help would be appreciated.

    Thank you

    I would recommend a configuration like this.  The idea is to read a byte at a time until the sync byte is found.  Then you read the next byte to get the length and then read this number of bytes.  I recommend using a queue to send the data to another loop for treatment.

  • Communication series-1073807339 error

    Hey all,.

    I know that this type of question has been asked several times before, but I have browsed the forums and have been unable to solve my problem after working hours. To be honest, I don't know what the problem is. The program was working fine yesterday and then randomly stopped working. I hope someone here can take a look at the code and give me an idea.

    Thank you

    LANL13

    Since it seems that you need the CR like a terminator, I would use VISA Initialize Serial Port, set the correct end indicator and then get rid of all these bytes VISA to the Serial Port and delays. Just use an arbitrary high number for the number of bytes to read.

    As he was working at any given time, I recommend also that you try to use the terminal as Hyperterminal, PuTTY, emulation program etc to also test communication. If this also fails, then there isn't a problem with LabVIEW.

  • Problem with USB configuration for communication series.

    Try to get usb serial communication defined on laptop Windows 8.1. Try Gigaware 26-949 cable to connect with the inverters & servo drives. Windows recognizes the cable but the States does not properly. Which cable & drivers are compatible to Windows 8? (Gigaware would work on old laptop Windows 7).

    Richard

    Maybe it's not the cable.  Try reinstalling the driver in compatibility mode.

    To install in compatibility mode do the following:

    Click with the right button on the installer > properties > compatibility > choose OS

    http://Windows.Microsoft.com/en-us/Windows-Vista/make-older-programs-run-in-this-version-of-Windows?SignedIn=1

Maybe you are looking for