Call HyperTerminal in Labview

Hi All
Could someone advise me how do i call Hyperterminal in Labview or simulate the same function of Hyperterminal in Labview?
I need to to send a programming file to my device under test (DUT) through serial port. There is a function in Hyperterminal called "Send File" (see attached picture). So i have to select the programming file (binary file) that i need to download to DUT (see attached picture) and click Send in Hyperterminal. The file size is 2760kb. The total programming time is 4.5mins using Hyperterminal
How do i do this in Labview? Can i send a file through using the write port vi or i have to break the file to few strings to fit the capacity of serial port (255 bytes max?)? If Labview can't send a file, how should i call Hyperterminal and is there any shell function that can be used? Please kindly advise. Thanks
regards
rebecca

I worked on a project before that I needed to transfer files via zmodem and I found a neat little program to do this.  It is Telix  it is an old program but has some scripting languages that make it pretty powerful.  What I did was to script sending the file in Telix, then there is an option within the program to use a startup script.  The way I used it was to record a script of manually sending the file then editing it in the script editor.  You can add things such as looking in a file for a parameter that labview put there previously and there is even a command to terminate Telix thus if you use the system exec vi to call telix initially when the script terminates telix it will return control back to labview.
- James
Using LV 2012 on Windows 7 64 bit

Similar Messages

  • Creating dll and calling it in labview crashing the program

    Hi All,
    I am using labview from quite a long time.But this time i am stuck with dll.Not able to solve this issue.
    I have to communicate with FTDI chip.
    I have a VC++ Project to communicate with SPI of FTDI.That Code is working perfectly fine.
    Now I Have to automate that through LabVIEW. VISA Drivers i cant use in this. So Last option left is either to create dll or to make EXE out of it.
    I have tried by creating DLL and then calling it in LabVIEW by using Call Library Function Node.But its not helping me out every time LabVIEW is getting Crashed.
    Is there error in creation of dll or something i am not doing properly while calling?
    Thanks In Advance 
    Shweta
    Attachments:
    old_dolphin_sub_spi_func_ftdi.c ‏21 KB
    ftdi_write_read.vi ‏15 KB

    Which function call crashes LabVIEW?
    Have you tried switching the calling convention from stdcall to C for all of the DLL calls?
    Why are you converting a string to a number, instead of using a numeric constant directly? If you want a number in hex, you can right-click a numeric constant, make the radix visible, and switch it to hex display.

  • LABVIEW.LIB was not called from a LabVIEW process

    Hi All,
    I've inherited LV code that calls a CIN node to access a motor controller.  I'd like to compile this code to a .NET DLL, but receive the following error when calling it from an external source:
    I've read the knowledgebase article explaining the problem from here, as well as the following support questions:
    http://forums.ni.com/t5/LabVIEW/Labview-lib-was-not-called-from-a-labview-process/m-p/232548
    http://forums.ni.com/t5/LabVIEW/Problem-with-lsb-LABVIEW-LIB-was-not-called-from-a-LabVIEW/m-p/48809...
    http://forums.ni.com/t5/LabVIEW/Labview-lib-was-not-calld-from-a-labview-process/m-p/718427
    http://forums.ni.com/t5/LabVIEW/Building-a-LabVIEW-DLL-with-VIs-that-use-CINs/m-p/632817
    The conclusion seems to be recompiling is the answer.  I've tried recompiling the original CIN vi within LV with no success.  Do they mean to recompile the original C code against the newer labview.lib (sorry, I'm not all that familiar with how the CIN nodes work)?  Any suggestions would be awesome.  Thanks.
    -Joe

    You can't make use of LabVIEW manager functions in non-LabVIEW based processes. Basically unless the C code is for a CIN or DLL that is to be called by LabVIEW (inside the development system or a LabVIEW built application), any function pulled in from labview.lib is not available. LabVIEW.lib is an import library that does not implement any functions but simply imports them from the LabVIEW kernel, either the LabVIEW development system or the LabVIEW runtime DLL. And no you can't just link in the LabVIEW runtime DLL into your .Net application. This DLL needs to be started up and initialized in very specific ways, that only LabVIEW itself knows about when building an application.
    Basically if you want to recompile the code (yes in C/C++) for use in a non-LabVIEW application, you also have to remove all the link libraries from the LAbVIEW cintools directory, and replace any use of functions now unavailable (link error: unavailable external reference) with other similar functionality from your C runtime library. Or implement those functions yourself using C runtime library calls.
    Another possibility could be to actually create a LabVIEW executable that exports the functionality as ActiveX Server. Or in LabVIEW 2010 you could also select to create a .Net Interop Assembly from inside the LabVIEW project.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • LABVIEW.LIB was not called from a LabVIEW process when creating unit tests

    We are developing a DLL to be integrated in LabVIEW using CLFs. So far we have the system working, but we wanted to create some unit tests in C as part of our release process. The problem is that when I link labview.lib in VS C++ and then call the EXE generated I get an error saying: "LABVIEW.LIB was not called from a LabVIEW process". As mentioned in http://zone.ni.com/reference/en-XX/help/371361J-01/lvexcodeconcepts/debug_dlls_and_dll_calls/:
    "Calling the shared library from another C program is also another way to debug the shared library. By calling the shared library from another C program, you have a means of testing the shared library independent of LabVIEW, thus helping you to identify any problems, sooner."
    Some of our functions, however, use LabVIEW specific instructions and we would like to test them in a realistic environment (i.e., calling to the actual functions instead of creating stubs).
    Is there any workaround to this problem?
    Thanks!!

    Hello SaraGr,
    Welcome to the NI Discussion Forums! I have a couple of questions to better determine the issue here:
    1. What is the LabVIEW version that you are using?
    2. Does your DLL uses Serial Compatibility VIs? If so, try using your development on NI-VISA instead of Serial.
    3. Are you using a Code Interface Node (CIN)? If you do, I see that from the help file you would need to compile the code for the new platform. Also, please remember that functions specifc to CINs (such as SetCINArraySize) will not work in a DLL.
    4. Be sure to include the header files in your program, like extcode.h. Please follow this white paper to link labview.lib to your program, or follow the Alternate Method.
    Regards,
    Daniel REDS
    RF Systems Engineer
    Help us grow.
    If a post solves your question, mark it as The Solution.
    If a post helps, give Kudos to it.

  • What kind of function(s) (in dlls) have to be call by a Labview application to be able to manage the PC's power supply

    Assume that a Labview application is running on a PC. The PC has a DC battery. When a "power off" is detected on the AC line, data should be saved, Labview application and Windows should be closed.
    What kind of function(s) (of which dll) should be called by a Labview application to realize this data and system management in a safe manner ?

    UPS (Uninterrupted Power Supply) systems can send messages to the PC through the serial port when the AC is lost and when battery is low. I'm not sure how this message is sent but I suspect they use Windows Messaging. If you could find this out, you could write your vi to constantly look for this message and shutdown when it sees the message.
    - tbob
    Inventor of the WORM Global

  • Fatal error Labview.lib not called from a Labview process

    in teststand my vi works fine with adapter set for LV development
    when I configure the LV adapter for runtime, I get fatal error Labview.lib not called from a Labview process
    what is going on?
    how do I fix it?
    thanks.

    Howdy Stephen -
    Are you by chance calling a LabVIEW DLL within your LabVIEW VI which is being called from TestStand?  I know this error occurs when a LabVIEW DLL built in a different version of LabVIEW than the selected Run-time Engine.
    Here is a KnowledgeBase which references the issue:
    KnowledgeBase 203EA3XC: LabVIEW.LIB Error When Calling a LabVIEW DLL Built with VIs That Use Externa...
    If this is the case, you will need to open the LabVIEW DLL source VI in the LabVIEW version you are using and rebuild the DLL.
    Thanks and have a great day!
    Regards,
    Andrew W || Applications Engineer
    National Instruments

  • Calling and using LabVIEW VI's in a C# application : user manual ?

    Hi everyone,
    I am working on a project (actually a proof of concept) where I need to call and use LabVIEW VI's in a C# application.
    I downloaded the example available on this page : Calling LabVIEW VIs from Other Programming Languages.
    This example (joined) is working fine, but I would like to know if there is an associated documentation concerning the .NET classes that I can use in C# when I use the namespace "LabVIEW" (using LabVIEW; in C#).
    I need to know a little more about the properties and methods that are available (what it does and how to use it).
    I looked for it on NI's website and the LabVIEW help but could not manage to find anything interesting.
    Is there an official documentation released ? How can I get those informations ?
    Thanks for your answer(s).
    Regards,
    Da Helmut
    Attachments:
    CallingLabVIEWFromCSharpUsingActiveX.zip ‏114 KB

    Hi,
    The class browser is usefull (ctrl + shift + b), but I am not developing the C# application on the same computer than the LabVIEW application.
    The *.chm file has all the informations in it but I am not finding it well organized. I am drowning in all the informations. I supposed there was a specific help file / manual for the ActiveX methods and properties (a kind of hierarchical view like in the class browser).
    Also I supposed that there were different methods and properties that the one available in LabVIEW.
    For example when I browse the class in C# I get those weird methods :
    Regards,
    Da Helmut

  • Heisenbug: Subsequence call, different file, LabVIEW

    Hi, all,
    I'm wondering if anyone has seen this Heisenbug. Sometimes, not always, when I call a subsequence in a different file, LabVIEW refuses to start -- even if the subsequence contains no LabVIEW. Usually I have to kill all threads to clear the problem.
    If I'm lucky, I get a message in the report that the LabVIEW ActiveX server couldn't be contacted or some such. Or sometimes I get a popup with a 406 error (Memory Manager) in LabVIEW.
    Once this starts happening, the TestStand script is permanently scrozzled and I have to revert to a known good copy.
    Also possibly relevant:
    - TestStand 4.1, LabVIEW 8.5. 
    - I'm starting a subsequence that includes LabVIEW calls in a separate thread. This has been working when the subsequence is in the same file. (The bug still shows up sometimes when the subsequence is in the same file.) 
    - The only common factor I've seen so far is that both the calling and called files contain LabVIEW.
    Has anyone seen something like this? It's killing my ability to modularize the tests I'm working on.
    Thanks,
    - Steve.
    Message Edited by SPM on 08-29-2008 12:16 PM

    Steve,
    reading your post leaves the impression that this malfunction occurs only after a reboot.
    So i take it that you switch on the PC, start TestStand after booting and start the execution. There it can (!) happen, that the file somehow gets messed up and does not work anymore with the given issue.
    Other sequencefiles can be loaded and executed properly after this.
    If that is correct:
    Can you check out if this behaviour is connected to e.g. special VIs?
    Did you ever encounter this issue with examples from NI?
    Is it connected to certain sequencefiles? If so, how do they concur (e.g. step definitions)?
    What happens if you make sure that LV is running before execution of the sequence?
    If you reboot the system, is the "corrupted" sequencefile still malefunctioning or does it (possibly) work again?
    hope this helps,
    Norbert 
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Call dll in labview

    "Hi All,
    I have to get data from USB camera, I have following functions in DLL.
    DLLINOUT HANDLE WINAPI CC_Open( LPCSTR CameraName , ULONG CameraNumber , CC_CAPTURE_MODE CaptureMode ) ;
    and
    DLLINOUT BOOL WINAPI CC_CaptureSingle( HANDLE Cam , PVOID Buffer , ULONG TransferSize , CC_TRIGGER_MODE TriggerMode , USHORT TimeOut , OVERLAPPED * pUserOverlapped );
    When I open hardware with function cc_open I am getting handle to an object. How can I store this object and pass it to CC_CaptureSingle function?
    Another question is when I call CC_CaptureSingle I am getting pointer on the 2 dimension array �PVOID buffer� how can I get this array in Labview?"

    hi,
    you can do this two thing.
    1. Create your new DLL with (your DLL will call camera's DLL) one big function my_capture_image() and insert you do CC_Open(), CC_CapruteSingle() and CC_Close(). And to LabView you pass only Array whit image data. And you don't have problems with HANDLE. But you must allocate memory for image array in LabVIEW before you call this DLL!!! [Or use LabVIEW C function for reallocating memory]
    2. You must identify type of HANDEL variable. And you can change type of this variabile. But when HANDLE variable is structure it is hard pass this structure to LabVIEW.
    If you use LabVIEW 7.1 look example 'Call DLL.vi' it is great!
    Have a nice day.
    JCC

  • Call function in LabView from a DLL, then access global variable from DLL

    I have created a DLL in LabWindows with a function and a structure.  I want to call the function from within LabView and then access the global structure.  I am able to call the function from the DLL with a "Call Library Function Node" and can access the return value, but I cannot figure out how to access the global structure.  The structure is declared in the DLL header file with __declspec(dllimport) struct parameters.
    Is there any way of accessing this structure without using the Network Variable Library?
    Solved!
    Go to Solution.

    dblok wrote:
    When you say "access to" or "the address of" the global variable, do you mean to pass the variable as an argument to the function call in the DLL?  If so, then I was not really sure how to pass a cluster from LabView by using the "Call Library Function Node".
    Yes, that's exactly right.  I would include a pair of helper functions in the DLL to read and write the global variable.  Alternatively you might write separate helper functions for each field inside the global structure, depending on the number of fields and whether you want to do any validation on the values.
    You can pass a cluster by reference to a function that expects a struct by setting the parameter to Adapt to Type, so long as the cluster does not contain any variable-length elements (strings or arrays).  The cluster needs to match the struct exactly, and sometimes that involves adding extra padding bytes to make the alignment work.  Variable-length elements in LabVIEW need to be converted to clusters containing the same number of elements as the struct definition (for example, if your struct contains char name[12], you would create a cluster of 8 U8 values, and you could use String to Array of Bytes followed by Array to Cluster to convert a LabVIEW string into that format).  If the struct contains pointers it gets more complicated, and it may be easier to write functions in the DLL to access those specific elements individually.
    If you can't get this working or need help, post your code and an explanation of the error or problem you're seeing.
    EDIT: it is also possible to include a single function in the DLL that returns the address of the global variable, which LabVIEW can then use to access and modify the data, but that's more complicated and likely to lead to crashes if you don't get the memory addressing exactly right.

  • Calling Dlls from LabVIEW

    LabVIEW Gurus:
    I am working with some software engineers who have no experience in LabVIEW. Unfortunately I have little experience in C/C++ to make sense of their inquiry.  
    Basically we are dealing with “Data Marshalling”. I will call a DLL and issue a command (string) and get back a 2-D array and an integer. So far so good.
    The C/C++ programmer requested that I provide them with a pointer/memory address in which they will store data, so I can read it once the dll returns the array and integer. I browsed through the example online http://decibel.ni.com/content/docs/DOC-1690 and thought that if I wanted to read from the dll, the process is a simple as calling the appropriate function and configure the parameter (no pointers needed).
    So, is there a specific way that they need to write the C/C++ code to be used in LabVIEW? Or what else to I have to take into consideration?
    Thank you,
    Santiago 

    That example is pretty simplistic as it only deals with integers. In this case no pointers are required since everything is returned by value. When you're dealing with arrays, however, you need to deal with pointers. If you open the Example Finder (Help -> Find Examples) and search for "dll" you will see the "Call DLL" example. That contains many examples of how to call DLL functions with a wide variety of datatypes. I strongly suggest looking at that example. There is also a chapter in the LabVIEW Help on calling DLLs (Fundamentals -> Calling Code Written in Text-Based Progamming Language).
    You have 2 things to consider:
    You're dealing with arrays - this means you typically need to pre-allocate the memory in LabVIEW, and it sounds like that's what the DLL expects you to do. This amounts to using the Initialize Array function to create your 2D array of the appropriate size and datatype.
    You may be dealing with a C++ DLL. LabVIEW can only interface to C DLLs. This doesn't mean that you can't create a DLL in C++, but it does mean that the C++ programmers need to add an extern "C" modifier to the function calls, otherwise you get name mangling, and LabVIEW won't be able to call the DLL. The DLL programmers should know what that means.

  • From hyperterminal to labview

    I am new on labview, and i need to do somethign with it that is why i need your help. I am using hyperterminal to control one laser. I can change wavelength, and swtich on, off ,and also i can read wavelength by using hyperterminal but i have to use labview to do all of these is that possible and from where i can start to do that. I mean i want to create on/off button to open/close laser and also controller to increase or decrease wavelength. I know hyperterminal codes, am i going to use these codes when i am writing new labveiw program for this laser? 
    Solved!
    Go to Solution.

    Actually, instead of writing my own program, i used example program to connect my device, i used basic read and write example, and i can connect my device but i could not get temperature data on read string panel. where am i gonna write my termianl command to control device and also don't i have to define terminal commands that are written on manuel. i wrote command to get actual temperature but i got same what i wrote on string to write panel. I attached what i got from program as a jpeg. And also sometimes i got result as a symbols instead of numbers.
    Attachments:
    VISA.jpg ‏91 KB

  • Error calling DLL in LabVIEW, but works in VC

    I compiled a DLL from Matlab, and then compiled a wrapper DLL in VC++. I tested the wrapper DLL in VC++, and it works fine, generating the correct output as in Matlab. 
    But when I call the wrapper DLL in LabVIEW, the first thing I noticed was that it only ran once. The second time I ran the VI, it returns an error. And the output is always a single number instead of an array when it runs. 
    I followed the examples how to create a wrapper DLL for Matlab compiled code. One of the examples said three functions Initialize, run and terminate should be implemented so that the DLL function can run continuously. I did all those, but it still does not work. 
    Here is the test code in C++. I explicitely loaded the DLL and ran the functions. It worked fine. Why the VI in LabVIEW does not do the same thing?
    // contourWrapper3.cpp : Defines the entry point for the console application.
    #include "stdafx.h"
    #include <Windows.h>
    #include <iostream>
    typedef int (*InitFunc)();
    typedef void (*TerminateFunc)();
    typedef void (*contourFunc)(double*,double*,int,int,double);
    int _tmain(int argc, _TCHAR* argv[])
    InitFunc _InitFunc;
    TerminateFunc _TerminateFunc;
    contourFunc _contour;
    HINSTANCE hInstLibrary = LoadLibrary("contourcWrapper.dll");
    if(hInstLibrary)
    _InitFunc=(InitFunc)GetProcAddress(hInstLibrary,"c​ontourcInit");
    _TerminateFunc=(TerminateFunc)GetProcAddress(hInst​Library,"contourcTerminate");
    _contour=(contourFunc)GetProcAddress(hInstLibrary,​"contourcGenerate");
    if(_InitFunc)
    _InitFunc();
    if(_contour)
    double image2DArray[] = {1,2,6,4,6,8,0,5,1,3,5,4,7,8,8,9,10,0};
    int width = 3;
    int height = 6;
    double c[sizeof image2DArray] = {0};
    _contour(c, image2DArray, width, height, 0.6);
    for (int i=0; i<width*height; ++i)
    std::cout << c[i] << std::endl;
    _TerminateFunc();
    else
    std::cerr << "Could not initialize libcontour properly."
    << std::endl;
    return 0;
     This is the output window of the above C tester code. It displays the correct output of array. 
    And this is the VI that does not work. 
    In the attached files, 'libcontour.zip' contains the matlab-generated dll and wrapper dll. 
    Attachments:
    contourcWrapper_test.vi ‏12 KB
    libcontour.zip ‏50 KB

    But LabVIEW does.  The declarations (in C) for different types of arrays are not the same.  I think you are passing extranious data to the DLL which is causing the issue.
    I will defer to your expertise however.  Over the years my knowledge in this area has waned.  Perhaps you are correct (in which case I am not sure what is wrong).
    Examples:
    typedef struct
        int dimSize;
        double data[1];
      } t_LvArrayDbl1D, *p_LvArrayDbl1D, **h_LvArrayDbl1D;
    typedef struct
        int dimSize[2];
        double data[1];
      } t_LvArrayDbl2D, *p_LvArrayDbl2D, **h_LvArrayDbl2D;

  • Can I call a regular LabVIEW VI from my C# application without first creating a DLL in the application builder?

    I am writing a C# application and have LabVIEW 8.2 and the Application Builder. I want the application to call different standard VIs included in LabVIEW. One way to solve this is to create a blank VI, insert the desired standard VI, have the Application Builder create a DLL and then let the application call the DLL. Something tells me there must be a shortcut to this, is there? Aren't all standard LabVIEW VIs really DLLs underneath the surface? Can I somehow call those DLLs directly?

    arnold_w wrote:
    Aren't all standard LabVIEW VIs really DLLs underneath the surface?
    NO, LabVIEW is a programming language and contains a lot of primitives. Some VIs are wrappers for DLL's but even calling these from C(#) might be a problem.
    You can exploit the LabVIEW ActiveX interface to perform all the actions you want.
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • How to call sequence in LabVIEW by providing sequence file path.

    Hi,
        Please provide me a solution to call sequence file from LabVIEW ActiveX API's by inputting sequence path to LabVIEW user interface.
    Thank you
    Yuvaraj
    Solved!
    Go to Solution.

    Here is a link that I gave some pointers on how to run an Open Sequence file via Single Pass.
    http://forums.ni.com/t5/NI-TestStand/Direct-execut​ion-of-the-sequence-when-UI-launches/m-p/2000819#M​...
    How are you launching this sequence, is the user selecting the sequence on disk?    Is it already open in a SequenceViewMgr control?
    Would an operator interface be more applicable to your situation?
    Thanks,
    PH

Maybe you are looking for

  • Dual 30" ACDs not working correctly in mirror mode

    My Apple Care guy is telling me that the problem I have is known and there is nothing they can do for me. I find this hard to believe, especially since it seems like I'm the only one complaining about this, so, before throwing in the towel and accept

  • OutOfMemory Exception in AdminServer

    Hello, we have several times OutOfMemory Exceptions in AdminServer. What are the recommend USER_MEM_ARGS to use aia? Currently we use the following configuration in setDomainEnv.sh: -Xms2048m -Xmx2048m -XX:PermSize=512m -XX:MaxPermSize=512m -XX:Appen

  • Names of the sheet

    They now follow the (inverted) norm of Excel (the formulas down, the names of the sheets up- just to do it differently apparently). But it has the same awful result than in Excel: if there are too much sheets, their names are hidden on the right. Eve

  • Elements 13: serial number invalid

    I purchased Elements13 not validate the serial number how can I fix it?

  • New Macbook Pro vs. the Apple Wireless Keyboard - delayed key action

    Ever since I've had the latest (not retina version) laptop, my wireless keyboard doesn't have the same response time between stricking the key and the action showing on my screen. My usual reaction is to reboot (turn off then back on) the keyboard, w