"Arduino TTL serial to Windows (LabVIEW VISA)"

QUick Q for the forum.
I assume serial TTL output from Arduino can be read and written directly by LabVIEW but I am not sure if this is the case when using TTL serial on the arduino.
I realize it is possible to talk to arduino via its secondary(or primary) serial port , the one that sets itself up as a virtual com port the way a USB to serial converter would and uses a USB cable. This is fine.
But what about talking to the board directly? 
If I wish to set up Arduino to loop waiting for input on its ttl serial input line how would I connect to it fromthat to my Windows and then LabVIEW?
Do I have to worry about the interface levels out of the PC's serial port? Can I just connect TX RX and ground from the serial port directly to the Arduino TTL serial input?
Thanks in advance.
Solved!
Go to Solution.

I think I just found the answer to my question. It looks to be a solid NO without some form of buffering the interface levels is done.
Windows PC's apparently put out  +-12V on the serial line.
Its not a show stopper but I was kind of hoping it would be a little easier to do this.
Has anyone attempted to make a psuedo serial connection to arduino using a bit bang technique (as in digital I/O) ?
If you have any code Id .love to see it.
Thanks again..

Similar Messages

  • Find names of all open windows including other applications besides LabView VIs

    Hi All, I have researched this subject, i.e., to find names of all open windows including other applications besides LabView VIs, but found no solution. Could someone suggest a solution to this?  Thanks.

    Hi,
    Certainly! The Windows API Function Utilities (32-bit) for LabVIEW includes set of LabVIEW libraries (llb) with VIs that make calls to the Windows Application Programming Interface (API) for managing and controlling windows (minimize, maximize, move, resize, rename, close, and so on) including task list with names of windows application running. The Readme.doc contains information on running these VIs.
    Attached below is a zipped file with a VI that list the names of all opened windows.
    Tunde
    Message Edited by Tunde A on 04-18-2007 02:28 PM
    Attachments:
    List Windows Application LV8.0.zip ‏55 KB

  • Can someone tell me how to emulate serial terminal window in labview??

    Hi can someone tell me how to emulate serial terminal window in labview?  or provide me simple code to do it? 
    baud rate 9600

    Have you tried looking through the example finder?  There's a a few great examples in there on how to read from and write to a serial port.  In LabVIEW just choose Help > Find Examples... and then navigate to Hardware Input and Output > Serial > Basic Serial Write and Read.vi
    David_L | Certified LabVIEW Architect
    LabVIEW Tools Network | LabVIEW Tools Network Developer Center

  • Will Labview VIs developed on a MacIntosh run on a Windows PC? How about visa versa?

    Will Labview VIs developed on a MacIntosh run on a Windows PC?  How about visa versa?
    Thanks,
    Dennis U

    As long as you don't use platform specific tools (such as IMAQ vision, ActiveX...), or advanced DAQmx functions, LabVIEW portability between platforms is excellent.
    On MacIntosh, LabVIEW works fine with virtual PC, but is very slow (5-10 times...). Try it and see if it suits you needs.
    Message Edité par chilly charly le 01-09-2006 09:19 AM
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • Implementar protocolo de comunicação serial UART no LabVIEW

    Boa Tarde,
    Estou querendo implementar o protocolo de comunicação serial UART no LabVIEW.
    A descrição do projeto é mais ou menos essa:
    - Uma Interface no LabVIEW para receber o dados enviados pela serial UART;
    - Uma DAQ NI USB-6212 irá receber o dado por um pino digital ou analógico (a princípio estou usando um pino analógico);
    - Um microcontrolador que envia dados através da serial UART;
    - Sistema operacional Windows 7;
    Estou querendo implementar o protocolo de comunicação pelos motivos:
    - Usei o Visa da comunicação serial e um cabo USB-Serial genérico, mas não consegui taxas de recepção rápidas como eu preciso, quando eu tentava transmitir dados de forma mais rápida, eles chegavam corrompidos;
    - O exemplos que encontrei do protocolo implementado usam o LabVIEW FPGA, e pelo que eu li minha placa de aquisição (NI USB-6212) não suporta FPGA.
    Tem algum exemplo ou sugestão de como devo proceder.
    Desde já agradeço.
    Atenciosamente,
    Fernando Esquírio Torres

    Good morning,  Fernando,
    Here are some links to help in its implementation. Any questions please contact us.
    What Is the Basic Architecture for Serial Communication?
    http://digital.ni.com/public.nsf/allkb/E0D95CB9249FB8CF86256C68007B1F81?OpenDocument
    Can I Do 9-bit Serial Communication Instead of 7 or 8 bits?
    http://digital.ni.com/public.nsf/allkb/3BDC7FF03541F772862564990057F919?OpenDocument
    9-Bit Serial Writing in LabVIEW
    http://digital.ni.com/public.nsf/allkb/E0D95CB9249FB8CF86256C68007B1F81?OpenDocument
    Serial Communication Starting Point
    http://zone.ni.com/devzone/cda/tut/p/id/4049
    Serial Communication - Basic Serial Write and Read
    http://zone.ni.com/devzone/cda/epd/p/id/2669
    Enviar ou Receber Dados Binários / Hexadecimais Utilizando NI-VISA no LabVIEW
     http://digital.ni.com/public.nsf/allkb/33C1056D66078118862577450061E683?OpenDocument
    Sending and receiving serial commands using VISA
    http://zone.ni.com/devzone/cda/epd/p/id/2423
    Sincerely,
    Mauro Vera
    Applications Engineer
    National Instruments

  • How to transfer file from PC to PC via serial port using labview

    I need to transfer files(.txt, .doc, .xls) from PC to PC via serial port using LabVIEW. Is it possible to transfer files, if so how to transfer?
    Solved!
    Go to Solution.

    Yes, it is possible to transfer files with the serial port using LabVIEW.  Files are just collections of bytes and the serial port is pretty good at shipping bytes from one PC to another.  You need to connect the serial ports together with a null modem cable.
    First, take a look at the example for serial communication.   In LabVIEW, go to the Help menu and select "Find Examples...".  From there you can search for "serial" or navigate to Hardware Input and Output >> Serial.  Select the "Basic Serial Write and Read.vi".  Experiment with that example to gain confidence on the serial communication methods.
    Next, it's time to learn about how to read and write files.  For that, the examples could be somewhat confusing since they all deal with files that are presumed to have data of a specific type in them.  I would recommend just getting familiar with the functions on the File I/O palette.  Specifically, get to know the following functions.
    Open/Create/Replace File - On your destination side, you'll need to create the copy of the file that you are trying to transfer
    Close File - When you are finished reading from or writing to a file, you should close it.  It cleans up the memory being used and finalizes any write operations that are still floating in the write buffer.
    Read From Binary File - The best way to read from a file when you do not really care what type of file it is.  In your case, you just want to get those bytes read and sent out so they can be written down at the destination.
    Write to Binary File - At the destination side, this is what will store those bytes to the file you created with number 1.
    Get File Size (under the Advanced File Functions sub-palette) - You need to know how big the file is so you know when you are finished.
    OK, so once you are able to create files, write bytes to them, and read bytes from existing files you can move on to transferring.
    The basic method I would suggest is to have the user specify a source file on the source PC and a destination folder on the destination PC.  Then, find out the size of the source file using number 5.  Divide that size number by the number of bytes you feel like transferring at once.  The serial buffers are usually around 32k (if I remember correctly) so do not exceed that.  Now begin sending data by reading some number of bytes and wiring that string output to the VISA Write function.  On the destination side, you'll want to be monitoring the serial port for bytes and reading them when they arrive.  Wire that string to the Write to Binary File function to add them to your destination file.
    That is the basic outline of how to do it.  You have to be careful not to overload the write and read buffers on the serial ports.  Initially you can use delays on the sending side to make sure the reading side has enough time to digest.  To get things moving faster, you can bring in some flow control.
    If all that sounds a bit intimidating, there are Alliance Member companies out there (such as PrimeTest Automation) who can write such code for you and even provide a turnkey solution for you.
    Happy wiring,
    Dan Press
    Certified LabVIEW Architect
    PrimeTest Automation

  • Communicating USB using Labview VISA

    I have a USB RAW device that I am trying to communicate with using labview VISA. I have had success with setting up the driver and I am able to get information from the device such as serial number, etc. When I try to use the VISA read and write commands, I have no success getting the information I want. The commands are simple: R SP<CR><LF> is a read set point command. The only thing I do get back for every command I try, is a 2 byte message "01 60"hex.
    If you have any suggestions, I would appreciate it, thanks!
    [email protected]

    Hello Chris, I do not receive any errors and yes, I am including the termination characters in the string.
    Here is what I get when I use a USB port monitor when I send out this string.
    Thanks!!
    [94] URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER (SUCCESS/0x00000000) 20101119150318.131 (+0)
    Pipe handle: 0x87696D6C
    Transfer flags: 0x00000002 (USBD_SHORT_TRANSFER_OUT, USBD_SHORT_TRANSFER_OK)
    Transfer buffer MDL: 0x88C47208
    Transfer buffer length: 6
    Bytes transferred
    0x0000: 52 20 53 50 0D 0A (R SP.. )
    [94] URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER (SUCCESS/0x00000000) 20101119150318.147 (+16)
    IRP status: 0x00000000 (STATUS_SUCCESS)
    Pipe handle: 0x87696D6C
    Transfer flags: 0x00000002 (USBD_SHORT_TRANSFER_OUT, USBD_SHORT_TRANSFER_OK)
    Transfer buffer MDL: 0x88C47208

  • Calling labview VIs from python in Linux

    Hello.
    I've spent some time searching for this but I haven't found exactly what I was hoping for.
    I'm involved in a project that we're starting now and it involves creating a complex software architecture in order to control a robot. This software will need to perform multiple tasks such as interfacing with hardware (which LabView is perfect for) as well as planning and high performance image processing (which LabView isn't as great for).
    I was hoping to be able to use a scripting language like python to manage high level stuff (planning, behavior, etc) by calling "subroutines" in other languages such as C++ for the high performance stuff and LabView VIs for the hardware interfacing. I would also like this to run on Linux.
    I've found a lot of suggestions on how to call Python scripts from within LabView but this is not what I want. I want exactly the opposite, invoke VIs from Python. I found some information on how to do this on Windows (http://zone.ni.com/devzone/cda/tut/p/id/5719) but this article seems to assume that Windows is being used.
    Does anybody have an idea on how to do this? 

    Unfortunately that's not an option. This is an interdisciplinary school project involving students from engineering (mechanical, electrical and more), computer science and more fields. Some of these students have gotten used to using Labview and this is the main reason I'm trying to accomplish this. I want to have the higher level architecture done in a scripting language such as python which will enable us to create modules in various different environments such as C++ for tasks requiring high performance (image processing for example), Labview for tasks that the people used to using that and even something running on the GPU if there's use for that. Python would make it easy to glue all these components together while maintaining an environment that would make it very easy to configure the whole software system in different ways.
    I'd also prefer that this all run on Linux.
    The more I look for this the more hopeless I get I'll find anything which is very frustrating. It's a bit hard to believe that Labview doesn't have "python bindings" for running the VIs from within python :-(

  • Where can I find example LabVIEW VIs for the NI-USRP?

    There are several sources of example LabVIEW VIs for the NI USRP:
    We have established a NI Community "NI USRP Example LabVIEW VIs" where you can find example VIs from us (NI) and the community.
    The NI-USRP driver installs a variety of example VIs to the to the following folder on your PC: 
    <LabVIEW Installation path>\examples\instr\niUSRP 
    where you should replace <LabVIEW Installation path> with the root folder of your local LabVIEW installation. For instance, my Windows 7 32-bit PC here has LabVIEW 2011 installed and the examples can be found here: C:\Program Files\National Instruments\LabVIEW 2011\examples\instr\niUSRP
    I've installed the NI-USRP driver, but I can't seem to find the new examples in the LabVIEW Example Finder. Where are the example LabVIEW VIs installed by the NI-USRP driver?
    Although the NI-USRP driver does indeed install examples, the current NI-USRP 1.1 release does not update the LabVIEW Example Finder with entries for these examples. To find the examples, you can navigate the Windows Start Menu to the following location: 
    Start Menu\Programs\National Instruments\NI-USRP\Examples
    This Start Menu entry includes several Shortcuts that point to folders that are the home to example VIs.
    Sam Shearman

    Hello,
    It looks like Agilent/HP makes the 8990A, but I was not able to find a driver for it that we or Agilent has written for this device.
    Since I am not familiar with the 8990A, I cannot recommend which drivers might be similar, but you are pointed in the right direction. Agilent themselves might know more about which models use similar command sets so that you can modify a driver easily.
    Hope this helps.
    Scott B.
    Applications Engineer
    National Instruments

  • Some errors when calling LabVIEW VIs Interactively from DIAdem

    Hi! I'm having some trouble using the "Calling LabVIEW VIs Interactively from DIAdem" found on:
    http://zone.ni.com/devzone/conceptd.nsf/webmain/1A98AB48E35D913086256E23004E6A22
    Following the troubleshooting section didn't resolve the issue. I
    recompiled and built the exe (DIAdemLabVIEW.exe) for version 7.1.1,
    which I am developing on. But still I got the same error message, after
    a waiting for about a minute, on a diadem popup window:
    Error in <MenuAdd...ctDo.vbs (row:1, column: 1)
    Error in <addmenuentry.vbs (row:14, column: 3)
    ActiveX component can't create object.: 'DIAdemLabWIEV.Application'
    Using the llb's and exe's that was included with the installer worked
    flawless, with the exception that LV 7.1.1 vi's didn't appear on the
    popup window(DIAdemLabWiev.vi). So I tried to recompile and build for
    the 7.1.1, with this result.
    I'd be very grateful for fixes or solutions for this problem!
    Regards
    Roger Isaksson

    Brad, thanks for the reply! Below is my (correct?) modification of your script. Have I got it right?
    Dim lvapp, vi, viPath, paramName(1), paramVal(1)
    Set lvapp = CreateObject("LabVIEW.Application")
    viPath = "C:\TEMP\Test.exe"
    Set vi = lvapp.GetVIReference(viPath)
    vi.FPWinOpen = True
    paramName(0) = "In Name"
    paramVal(0)  = "In Value"
    paramName(1) = "Ut Name"
    Call vi.Call(paramName, paramVal)
    Call lvapp.Quit()
    MsgBox "Parameter1 Value = " & paramVal(1)
    I am not sure about the format of the <paramName(0) = "In Name">.
    The control name is "In" and is a I32, the name for the indicator is
    "Ut" and has the same storage type as the control.
    Running the script gives an error in line 4, that is the <Set vi =
    lvapp.GetVIReference(viPath)>. I'll attach the exe and the error
    message.
    I have another question regarding the relatively large amount of RAM
    that diadem uses for export from my labview application to diadem. More
    than 10 times the size of the data is required for exporting to diadem.
    Since our application use relatively large files, actually up to
    several GB's, this soon becomes problematic. See the attached picture
    of the memory usage after exporting a 10MB segment (contains 42
    channels of measurement data). Your help in these matters would be
    appreciated!
    Regards
    Roger Isaksson, Damill AB
    Message Edited by Roger Isaksson on 09-09-2005 10:22 AM
    Message Edited by Roger Isaksson on 09-09-2005 10:22 AM
    Attachments:
    VBError.JPG ‏181 KB
    Test1.vi ‏9 KB

  • Labview visa couldn't read and write in wireless port

    Hi I have a problem using wireless serial port in Labview. I couldn't read the data from the serial port.  the Max could find the port com10 and com 11 and also find the software NI-visa 5.2 has been successfully installed.
    Could anyone helps me with that? thanks!
    my computer is win7 64 bits and my labview is 2012 32bits and visa is visa 5.2. Therefore is it have some problem with operating system with labivew? 
    and here is my program:

    Hi
    there is no error occur when i use visa function. I plan to use two wireless serial port to commuicate. One is on microcontroller one is on laptop. For the testing whether they could work. I use two wireless ports to plug into USB on the laptop.  One port is to write the string another is to read the string. The instrument is called "Silicon Labs CP210x USB to UART Bridge" in the hardware manager.
    This is my program running like this:
    also I try the basic VISA read/write examples to test. But it is still not work and report error. This is example runing basic visa read/write:
    By the way.Could you tell me what do you mean the " send similar commands via a VISA test panel (MAX)"? 
    thanks
    Kun L

  • OBD1 ALDL communication with Labview VISA

    Hello all,
    I am new to serial communication with labview.
    Task:
    trying to send a command and receive data from a 1987 corvettes ECM using VISA serial block in labview.... and failing hard
    Troubleshooting the problem:
    Hardware: works with EFI live V4 (software that communicates with cars), send and receives data all day long, so my hardware is not the problem
    software: it is something i am doing wrong in my coding
    Example code form EFI live V4:
    37:30.137: Send: $80,$57,$01,$00,$28
    37:30.137: Finished writing frame
    37:30.137: Wait 10 ms after writing, before reading...
    37:30.147: Start reading frame
    37:30.147: Aldl frame header byte: $80
    37:30.147: Aldl frame length byte: $57
    37:30.147: Recv: $80,$57,$01,$00,$28
    37:30.147: Finished reading frame
    37:30.147: MAX232 echo: $80,$57,$01,$00,$28
    37:30.147: Wait 10 ms after writing, before reading...
    37:30.157: Start reading frame
    37:30.160: Aldl frame header byte: $80
    37:30.160: Aldl frame length byte: $95
    37:30.241: Recv: $80,$95,$01,$1E,$5B,$00,$00,$00,$00,$00,$44,$44,$1D,$00,$9C,$D6,$00,$00,$FF,$66,$00,$80,$80,$00,$80,$64,$80,$FF,$00,$80,$00,$27,$27,$00,$00,$00,$77,$00,$3A,$00,$43,$00,$00,$00,$00,$00,$00,$00,$00,$01,$BD,$00,$00,$00,$00,$00,$00,$D5,$2A,$22,$00,$07,$00,$00,$0C,$00,$DE
    37:30.241: Finished reading frame
    Example code protocol i tryed into the visa block in labview:
    $80,$57,$01,$00,$28
    $80,$57,$01,$00,$28\n
    $80,$57,$01,$00,$28\r\n
    $80$57$01$00$28
    $80$57$01$00$28\n
    $80$57$01$00$28\r\n
    80 57 01 00 28
    80 57 01 00 28\n
    80 57 01 00 28\r\n
    8057010028
    8057010028\n
    8057010028\r\n
    VISA read Result:
    i just get an eco back of the same command i sent
    Question:
    is there something simple i am missing in the command protocol or a possible setting i am overlooking?
    also what is the purpose of the “$” in the Hex command?   
    background info:
    vehicle : 1987 corvette
    ECM type: 16198259
    com. protocol : ALDL OBD1
    labview v8.5
    baud rate: 8192
    data: 8 bit
    parity: none
    stop: 1
    buffer size: 256

    Are you actually supposed to be sending hex? You need details on the actual format of the data. I don't think viewing the output of some other program will tell you what is truly being sent and received unless its a sniffer such as portmon.
    You can right click on the string control and select hex display. You also did not include the actual VI so no one knows if you have it set to send \r and \n correctly.

  • Labview VISA Flush I/O Buffer, how can they be used?

    I need to flush the i/o serial buffer and the VISA Flush I/O Buffer or
    VISA Clear seems to be useful.
    How can they be used? I can't find any examples.
    I am using Labview 7.1
    Regards
    kas

    Do you mean what value to wire to the mask?
    If so, here is a description:
    VISA Flush I/O Buffer
    Flushes the I/O buffer specified by mask.
    mask designates the buffer to flush. Combine the buffer masks by bit to flush more than one buffer simultaneously. Use logical OR, also known as OR-ing or adding, to combine the values.
    Mask Values
    Hex Codes
    Description
    16
    0x10
    Flushes and discards contents of the receive buffer.
    32
    0x20
    Flushes and discards contents of the transmit buffer by writing all the buffered data to the device.
    64
    0x40
    Flushes and discards contents of the receive buffer.
    128
    0x80
    No I/O to the device.

  • Labview VIs for HP 35670A

    The link to the labview VIs for the HP 35670A is no longer valid and the search for the same returns nothing.  Does anyone have the Labview VIs for that instrument?
    The last post was back in 2004(see below)
    The instrument driver for the HP 35670A is only
    supported under LabVIEW 6 and 7. You should upgrade to the latest
    version of LabVIEW in order to use the HP 35670A driver or any of the
    newer drivers that we release in the future.
    The instrument
    driver for the HP 35670A can be found on our web site at
    http://zone.ni.com/idnet97.nsf/9b2b33e1993d877786256436006ec498/61f1c707c2f10906862568ab005fb9ff?Ope...
    Solved!
    Go to Solution.

    Why don't you go to the Instrument Driver Network? I don't know what kind of search you did but the driver is certainly still available and can be found by using the search option there.

  • How to read and write data from Excel to TestStand without using LabVIEW VIs

    Hi,
    How can I read in columns of data from Excel into a TestStand array and write columns of data to Excel from TestStand without using LabVIEW VIs?
    I don't think the Property Loader custom step type in TestStand will work because the data I would like to read in from Excel is in a column that is thousands of rows long and the data has to be in the proper format to use the Property Loader to load in an array from Excel.
    Thanks for your help.

    That example does not use LabVIEW and it does about 40% of what you need to do by calling Excel through ActiveX. If you don't know how to use Excel through ActiveX then you'll need to brush up on that.
    http://www.microsoft.com/en-us/download/details.aspx?id=16250
    http://support.microsoft.com/kb/141759
    http://support.microsoft.com/kb/302084
    CTA, CLA, MTFBWY

Maybe you are looking for

  • Java If/Then/Else Statement

    Hello, Just wondering if it is possible to call one java file from within another. I'm thining wiht an if.then/else statement similar to If x==true then run file1.java else run file2.java any examples of this, or if it is even possible would be appre

  • Reverse goods receipt after invoice posted

    Hi experts, I have a PO that was goods receipted and invoiced receipted (work was done). Someone has then un-goods receipted the PO, and now that entry needs to be reverse (the work order has status closed). What would be the way to fix this? Re-open

  • Urgent help in Requisition

    Hi, In E-recruiting ,  Requisition information is stored in HRP5125 database table.   But the history of "status" and "Reason_code" is not saved in HRP5125.  Only one status update (last one) per day is getting saved. where the status history is save

  • Errors occure during iTune upgrade

    I checked for available updates and was informed that new version 11.0.2 of iTunes is available. After selecting "Install" updated was downloade. While in installing stage of updating iTunes I get a message: "An errors occured while installing the up

  • Organizing Photos by Original Date

    I've recently replaced by hard drive and upgraded to iPhoto 6. The problem is that my photos are all arranged in random order. The dates associated with the original files seem to have changed in some cases so that the photos are all mixed up instead