RS-232 through TCP/IP with LabView

Hello
I currently have a serial device being read through a hardware RS232 to TCP/IP converter.
On the computer with labview I use a third party virtual serial port that reads the TCP/IP data and converts it pack to COM port data.
I then read the COM port normally with VISA.
I would like to remove the third party TCP/IP to RS232 software and have LabView read the TCP/IP port and convert to serial.
How would I achieve this?
More details on the hardware and 3rd party sofware;
thydzik.com/monitor-cms2000-inverter-via-tcpip-usr-tcp232-e4-rs232ip-convertor/
More details ont he labview code here;
thydzik.com/log-solar-generated-to-pvoutput-with-labview/
Solved!
Go to Solution.

I don't think it's as complicated as you seem to expect. Try the VISA TCP approach. Create a VISA TCP resource, in raw mode, as explained in the white paper. Take your existing code, replace the COM resource with the new TCP one, remove the serial port configuration, and it might just work. Make sure you close the resource when you stop there program.
If you want to go with the TCP functions, take a look at the examples. You open a connection, read and write strings to it exactly as you would with a serial port, and close it when you're done.

Similar Messages

  • Spy TCP/IP with Labview

    I'm intensively using Labview as a test platform for communication
    interfaces
    Currently I've a serial spy decoding HDLC which works quite well
    I need also to perform some traces on TCP/IP
    WhichVI should I use ? How do I have to configure it ?
    Many Thanks

    Hi,
    I recently work on it. Even if I have some difficult I wrote a dll using
    Libpcap ( see winpcap.polito.it but it can't be used by LV6 ) and the
    associate vi. These run with NT4. My problems now are to decode these
    ethernet frames to something usefull like in ethereal or somethink else.
    Give your e-mail I'll send you all I do but I can't say when.
    Eric
    "pfg158" a ecrit dans le message de news:
    [email protected]..
    > I would like to decode ethernet frames betwenn two equipements.
    > So, I'm a quite newbie with Labview and it's seems to be not so easy
    > to use dll's in Labview.
    >
    > I look for a tool (vi using a dll?) that give me all ethernet frames
    > transmitted between two equipements.

  • SPy TCP/IP with Labview 6

    I'm using Labview as a test platform for communication
    interfaces.
    I would like to perform some traces on TCP/IP.
    Which VI should I use ? How do I have to configure it ?
    Many Thanks.

    Hi,
    I recently work on it. Even if I have some difficult I wrote a dll using
    Libpcap ( see winpcap.polito.it but it can't be used by LV6 ) and the
    associate vi. These run with NT4. My problems now are to decode these
    ethernet frames to something usefull like in ethereal or somethink else.
    Give your e-mail I'll send you all I do but I can't say when.
    Eric
    "pfg158" a ecrit dans le message de news:
    [email protected]..
    > I would like to decode ethernet frames betwenn two equipements.
    > So, I'm a quite newbie with Labview and it's seems to be not so easy
    > to use dll's in Labview.
    >
    > I look for a tool (vi using a dll?) that give me all ethernet frames
    > transmitted between two equipements.

  • Arduino Yun tcp/ip with Labview

    Hi. Are you able to use labview to control an arduino yun using tcp/ip wirelessly?(For example turning on and off a relay) Has anyone done it before?

    OK, so you'll need to write two bits of software - your Arduino Sketch and the LabVIEW code. You'll need to think about which piece of software will be your 'server' (listens for a connection on a specific port) and which one will be your 'client' (establishes the connection). Once you've established the connection, either the server or client can send/receive data at any time. 
    You will also need to define a communications protocol - this is the series of commands you send/receive to make things happen. For simplicity, I'd recommend a simple ASCII string protocol (for example: RELAY ON). You'll also need to determine the termination of the TCP/IP commands - this is commonly done using the CRLF character sequence or by prepending the TCP packet length to the data before sending and when you receive you read the 'length' bytes first and then the data.
    For the Arduino side - I'm sure you'll find lots of example sketches of how to do TCP/IP communications.
    For the LabVIEW side - look in the LabVIEW examples and you'll find a simple client/server example which shows LabVIEW acting as both a TCP server and TCP client.
    Certified LabVIEW Architect, Certified TestStand Developer
    NI Days (and A&DF): 2010, 2011, 2013, 2014
    NI Week: 2012, 2014
    Knowledgeable in all things Giant Tetris and WebSockets

  • I want to interface third party/NI Webcam with Labview .

    In my application i want to interface 3 NI / Third party WEBCAMS on TCP/IP with Labview 8.6 on host PC having Windows XP OS.
    I am using Compact CRIO 9704 hardware with real time deployment module.
    For interfacing webcams which drivers i required? OR Any deployment module is available in NI?
    Please suggest.
    Thanks in Advance.
    Sachin

    Hi Sachin,
    These cameras will be interfaced throught ethernet or USB. Will they be connected to the PC running Win XP or are you looking to interface them with the cRIO.

  • TCP/IP communication with LabVIEW Full?

    Hi,
    I would like to know if the TCP/IP VIs are included with the Base or Full version of LabVIEW?
    I was looking at the different versions of LV and one of the features of the Pro version is 'Network Communication'.
    I have done TCP/IP communication a while ago and I am quite sure it was with the Full version. I have the Pro version now but this is for a customer.
    This brings another question: Is there a trick to be sure your code is going to work on a system with LV Base if you develop on a system with LV Pro?
    Thanks!

    I think that was a good answer to your first question. To answer your second question, if you are creating executables to be run on a computer with LabVIEW Base there will be no problem running the executable because LabVIEW Base has the run time engine. If you are sending VIs to another computer with LabVIEW Base they will not be able to access any VIs that are not included in there package. There is no simple way to tell that these VIs are not included except through the link in the previous post. In LabVIEW 8.6 many of the help documents state what LabVIEW package installs the VI. If all of the VIs state that they are installed with LabVIEW Base you will have no problems.
    Vince M
    Applications Engineer

  • Communicate a PC with GPRS module through TCP/IP

     I want to exchange data between a PC and a GPRS module.
    One problem i have is that my PC is on a local network and the IP my computer has, is the local IP. The server has a different IP through we connect to the internet. Which IP I must use and how?
    I know almost nothing about TCP/IP (i have use the Labview TCP/IP functions successfully at our local network) and i would like to ask for informations. I know it is a little irrelevant with Labview, but as there are many users who uses GPRS modules, i would like informations about how to connect a GPRS module through TCP/IP. Simple examples will be the best.
    Any informations, links, recommended books, will be highly appreciated.
    Thanks

    Pnt wrote:
    Thanks for answering Rolf.
    To be more clear : i have a GSM/GPRS module (like the well known Wavecom's modules (or Falcom, Telit...)). They accept AT commands and they have a D-sub-9 serial connector. They connect to serial port of the PC. I want to connect to the internet with TCP/IP (by sending AT commands). But i can not find any manual..! The module have some commands for TCP/IP but no explanation or examples. Those modems have no drivers, they accept only AT commands.
    For example i have to set APN and IP Address which i don't understant what i should write to. It is independant of Labview but i do not know where to look for information.
    If someone knows anything similar please reply.
    In that case what I wrote applies fully to you. You do not want to communicate with the modem from LabVIEW itself. You want to use TCP/IP and that means using the Windows socket library that the LabVIEW TCP/IP functions access. The modem then needs to be installed in the Windows system as a dialup adapter. There is really no other way to use a modem, GPRS or not, as TCP/IP communication path. Trying to implement TCP/IP,SLIP/PPP and all that in LabVIEW would be a many man year project with lots of problems and the likely chance that it will never fully work.
    So get your modem to work under Windows so that you can use your browser to view some internet pages and once that works you can also use the LabVIEW TCP/IP functions to communicate with whatever is there.
    Direct communication to the modem through AT commands would only make sense if you wanted to access the SMS facilities in that modem instead. Even that is not exactly trivial as I can attest to, especially if you want to make it work with more than one GSM modem type.
    Your modem manufacturer should be able to give you the necessary modem initialisation string to put your modem into the right GPRS mode and your mobile phone network provider should be able to tell you the dialing number to fill in the dialup configuration. No need to do anything else!
    As Wiebe explained rasdial.exe would then make it possible to connect to the internet under LabVIEW control.
    All in all it's doable but I have spent many hours to get it working last time I did. A few of those were spent waiting on the line for the support persons of the mobile network provider to answer my calls and then playing the ping pong game to get a person that actually knows what a computer is and that it's actually possible to connect a modem to it to use their services.
    Rolf Kalbermatter
    Message Edited by rolfk on 01-09-2008 06:06 PM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Labview was blocked when building communication through TCP/IP

    I am trying to transfer data between a Labview system with Win2k and a RT system on PXI controller through TCP/IP. A problem is that when the Labview program started to build the communication to RT, the other Labview programs are all blocked. Howerver, the other application programs except Labview are running properly.  

    Thank you Mike.
    I am trying to transfer data through TCP/IP and Ethernet. The source is a Labview RT program in a PXI controller, and the receiver is a Labview 6.1 program in a workstation with Win2k, and here we focus on the program in the workstation. Besides the communication program, some other Labview programs are also running in the workstation in the mean time.
    The problem occurred at the beginning of the TCP connection: during the following several seconds after the communication program started, I cannot access any of the Labview programs (no response when click on any Labview program). Meanwhile, I found that the CPU usage and memory usage were in normal level and I can access any other windows application program properly. So it seems that the communication program held up all the LabVIEW programs when it started to build connection. Do you have any idea?
    Pierce

  • Tranfering data to LabVIEW through TCP/IP

    Dear all,
    Hello! I am a new LabVIEW user. What i am trying to do is to transfer
    data from one computer running a commercial package, to a remote
    computer running LabViEW, through TCP/IP. To do that i developed a
    simple LabVIEW code, which establishes a connection first and then
    tries to read data. The connection seems to work, but i get no data.
    After the first TCPread i placed an indicator, to check if data is
    transfered, where i am getting the message "nect"...any ideas on what
    this could mean?
    Any help would be more than welcome!Thank you in advance!
    Ferrari

    I don't think we have enough information to troubleshoot this issue from your description, because there is a nearly infinite number of possibilities to "transfer data via TCP/IP". What kind of "commercial software" is the server you are trying to contact? Is it LabVIEW based? What are the specifications to transfer the data? Are you trying to use low-level TCP or e.g. datasocket?
    LabVIEW Champion . Do more with less code and in less time .

  • Tcp/ip communication with LabVIEW

    Does anyone have experience building an application with LabVIEW that
    communicates over a socket? I new to LV, but it appears that the
    application I have in mind is possible. Specifically, the LV
    application would open a socket (port and IP known ahead of time) and
    send a character to that socket. Depending on the character sent, the
    application on the other end (a UNIX process) would send back a one
    integer value to indicate the number of packets to expect. The LV
    application would next need to parse each packet for such things as the
    packet length, data length and so forth and then distribute those data
    to appropriate sub-processes. The header value types are integer,
    double, byte and character. The data values are all 4-
    byte integers.
    The sending code (on the UNIX side) was written in C. The aggregate
    throughput is relatively low; no more than 2,000 bytes per second,
    including packet headers.
    If I can get this to work, the results would represent a significant
    cost savings over competing alternatives. As a federal employee, I'm
    always looking for the most cost effective solutions.
    Thanks.
    -Robert
    Basically, I'm just looking for confirmation that this sort of thing is
    possible with LV. And, I'd like to get a better idea of how hard it
    would be to do.
    Sent via Deja.com http://www.deja.com/
    Share what you know. Learn what you don't.

    Hi everyone,i am currently trying to communicate with two computers at the moment using TCP/IP.I have done a simple server and client VI but the server doesnt seem to be writing the string im trying to send and it also gives an error message
    Error 1 occurred at TCP Write in Server.vi
    Possible reason(s):
    LabVIEW:  An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.
    Please find attached the simple server and client VIs i have done.can you help me?
    Thanks
    Osowoaji
    Attachments:
    Server.vi ‏13 KB
    Client.vi ‏13 KB

  • HP/Agilent Infiniium 54831B scope - how to connect with LabView 6.0 by LAN (TCP/IP)

    Dear,
    I'm looking inf. how to connect Agilent Infiniium 54831B scope with LabView 6.0 by LAN (TCP/IP).
    Thanks in advance.
    Regards,
    Z.Mrowka
    mailto:[email protected]

    Hello,
    If the instrument is capable of being controlled from its TCP/IP port, it will be possible to communicate with the instrument from LabVIEW using VISA.
    The VISA resource name input will need to be entered manually and is a little different from the normal Serial or GPIB format. The format is as follows:
    For SOCKET connections, this is just like the traditional TCP functionality in LabVIEW. An example string that connects with the NI FTP site is:
    "TCPIP::ftp.ni.com::21:OCKET"
    For INSTR connection, this requires a device that supports the T&M standard LAN instrument protocol. An example of this (that we have tested with) is the Tektronix 3054 Scope. A string that connects with this scope is: "TCPIP::HostnameOrIP::gpib0,1::INSTR"
    I hope this
    helps,
    Anthony Bacak
    National Instruments
    Applications Engineering

  • Capture video through TCP/IP protocol in labview

    Hi Friends, How to acquire video data using TCP/IP read? actually i am trying to control a robot using labview. This robot has WiFi card and has an ip 169.254.0.10. Robot control protocols are already burnt into blackfin processor, of the robot, example.... if i enter 8 in string control of front panel, robot will move forward, 2 is backward, 6 is right and 4 is left. Robot has camera and transmits images through tcp/ip protocols. well.... i am able to establish wifi connection between my PC nd robot and i am able to control it simply by entering corresponding numbers in string control of VI but i am not able to acquire video from the camera through TCP/IP read platelet. ( someone has created a java consol for this robot and i downloaded it from online forum. by running this consol i can control the robot and also accquire real time video) but i want to do the same using labview. please help.
    labview version: 8.6
    NI vision 8.6
    vision acquisition 2009
    robot reference
    robot control protocols: http://www.surveyor.com/SRV_protocol.html
    http://www.surveyor.com/SRV_info.html
    journal: http://www.surveyor.com/cgi-bin/robot_journal.cgi
    Forum: http://www.surveyor.com/cgi-bin/yabb2/YaBB.pl
    Attachments:
    roboimage.vi ‏39 KB

    You do realize that you are not actually reading any data, don't you? Your input to the TCP Read VI is the default which is a value of 0. So in essence you are saying read nothing. Also from reading through some of the information you pasted it appears that the video is streamed via a web browser. There simply reading from a TCP port will not accomplish what you want. Do you have the Interent Toolkit? That has an HTTP protocol implementation which may work for you though I don't think it will have what you want. It looks like you need to send an HTTP GET to retrieve the video image. You could also try using ActiveX or .Net to embed a browser window in your application.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Does anyone have an example of a c++ TCP/IP client that works with labview TCP?IP server ??

    I have the labview TCP/IP client/server working fine, but now I need to do this were labview is the TCP/IP server and the c++ program is the client. Does anybody have a simple C++ TCP/IP client that works with labview TCP/IP server ????

    Thanks, you were right, we modified the c++ program to include the port # in the IP address and it worked.We also forgot to convert the port #. I included my labview and c++ program.
    Attachments:
    TCP-IP.llb ‏47 KB
    client.exe ‏40 KB

  • Interface of Allen Bradley PLC with LabVIEW using TCP\IP modbus protocol

    Hello.....
    I want to connect a Allen Bradley PLC with LabVIEW using TCP\IP modbus protocol.
    The PLC which I am using is a series of 1766BWA (Allen Bradley) please can you help me for the same or please give me suggestion.
    Also I want to know the resistance values of this PLC.
    Thank you.

    Hello
    I was trying for connection of a Allen Bradley PLC with LabVIEW using TCP\IP modbus protocol.
    Here I am attaching the snapshot of PLC interfacing and communication vi using modbus but it is not working
    For reading we use setting shown in CHANNEL 1-modbus but it gives error regarding modbus addressing
    and for writing it shows error illegal address please help me for the same.
    Thank you.
    Attachments:
    PLC_SCREEN.zip ‏261 KB
    Modbus_(Read-Write).zip ‏14 KB

  • Need help : Reading from DAQ through TCP/IP ?!!

    Hello
    I have two machines running labview connected to a network. Basically,
    I want to read data from a temperature sensor through a DAQ card
    from one machine, and be able to plot the data in a chart in the
    other machine. I'm trying to use TCP/IP feature to do that but it's not
    working.
    There is a VI in the tcp.lib "simple data client.vi " and
    "simple data server.vi" that does the same thing except that
    the data are of type double generated from a sine function and
    a random number generator. So i tried to do the same but since
    the data read from the DAQ has a thick brown line (not sure what
    type) the task was not easy. In the server part i tried to broadcast
    3 things through (tcp write.vi): The type of the data, the l
    ength of the
    string, and the data itself. On the client side i read (tcp read.vi)
    these things and plot the data. But i'm not getting any output on the chart.
    I had to use (Type Cast), (flatten to string) and (unfatten from string)
    in order to get the right wiring. Both VIs run but there is no output
    on the chart.
    I know it's hard to explain in words, but if anyone is interested i can
    give more detai or send the vis to him to look at them. They seem very simple and
    straight forward but i don't know why they don't work.
    Appreciate any help.
    Thanks
    Sami

    Try running the "Remote Device Access Server" (RDA) on hte machine that has the DAQ card in it. You'll find it in NI-DAQ folder under National Instruments in your Start Menu. (guessing you're running Windows here?)
    With this running, you can start MAX on any machine on the network and access and configure the DAQ cards in the remote machine and program an applicaiton just as if the DAQ cards were local. You'll need to know either the remote machines IP address or network name.
    I've used it quite a bit and have never had a problem. The Help inside MAX gives good details on how to set it up and use it.
    Ed
    Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
    Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.

Maybe you are looking for