How do I control serial power using LabView?

I need to use LabView to alter the voltage coming from the serial port. Is it as easy as writing to the serial port? I know that if you write to the serial port that it'll produce a binary number, does this binary number correspond to a voltage.

If you want to create a scalable voltage value coming from the serial port you must have a Dig -> Analog conversion circuit.
If your goal is to vary a voltage from 1 - 10 vdc, then you must create:
1) a an external circuit that will convert/buffer digital serial interfaced binary values to analog values (ni makes these things)
2) labview code that transfers info to serial port. (driver/etc)
hope that helps!
did that answer your question?
Chances are if you have seen VI in the forest it hasn't fallen.

Similar Messages

  • 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

  • How to actuate 20 solenoid valves using labview

    I want to perform an action of detaching materials from a fixture by actuating 20 pneumatic pistons controlled by 20 solenoid valves.
    If the valve is actuated the piston moves and stays in the location for 1 sec and then return back. Each of these cylinders should be able to be controlled separately.
    Kindly provide me with the necessary equipments i should buy.
    How can i control 20 solenoids using a DAQ card.  is it possible? 
    Also i need to accept around 20 Digital Signals too.
    Could you specify any card that will meet the spec.?
    Thank you in advance.
    Regards
    grugh
    Regards
    Grugh Mike
    Success is Everything !!

    With the equipment that you have, a good choice would be Opto-22 series for the G4 series of the Opto-22. Select the screw terminal base and an ODC module appropriate to your power/voltage requirements. this will use the TTL digital output to control a power solid state relay. If you look to the other signal conditioning products from NI, they will allow you to do the same thing as well.
    Stu McFarlane
    Viewpoint Systems, Inc.

  • Communication through RS232c serial interface using labview

    i am trying to communicate with a device through RS232c serial interface using labview 6.1....i have tried to run the example "Serial communication.vi" provided in 6.1 and it doesnt work....do i need any special hardware or do i need to configure my hardware to communicate through RS232c...
    thanks in advance
    shri

    Seems like I placed a small (maybe 30ms) delay at the end of the serialcommunications.vi structure.. for some reason my PC didn't like running as fast as it tried to go. Also look into the actual serial communication.vi and open the vi's inside it - check that the port setting (0 or 1) are ok, the baud rate (probably 9600) are ok. I'm running with only three wires in my application, TX, RX and Common. The PC may need to be rebooted to enable the com port - or use device manager and see if it says the com ports 0 and 1 are both OK..
    Try buildinga loopback plug with TX to RX, RX to TX, and Common to Common and see if hyperterminal (or other serial communications program works - there is also Loopback.VI in the NI library somewhere that can be used. Good Luck!! Dave

  • How can I check serial number using icloud

    how can I check serial number using icloud?

    If you are talking about an iPhone and you simply tap on settings/general/about
    Both IMEI and Serial numbers are there to see.
    You can use the *#06# short code on the phone keyboard to see IMEI as well
    Or connect your iphone to iTunes on a PC/Mac
    Click on the device in side bar and summary button at top left of browser window
    In the top panel you have :-
    Name of the device
    Capasity
    Build Version/Software version - Mouse click on it to change which is displayed
    Serial Number/UDID Identifyer - Mouse click on it to change which is displayed
    Phone number /IMEI -Mouse click on it to change which is displayed
    Its very easy to see both numbers if you actually have the device.

  • How to control TTL device using LabVIEW?

    I have a device which requires TTL (+5V) to control it to be on/off. How can I provide this TTL to it using LabVIEW? I guess I should install a PCI board in my computer to connect to this device, but how to do my LabVIEW coding to control it?

    Hi,
    First of all if your board is NI board after corect instalation you need to view this board in the section Devices & Interfaces from the NI program Measurement & Automation Explorer.
    Also if the board is NI board or has the divers for LABView you need to find in the LabView the functions to command your board.
    Other posibility is if your board is no't compatibile wi NI, in this case you need to extract from DLL, the function to command the board.
    By

  • How do i open and control other programs using labview?

    I'm presently trying to use labview to try to open and operate another program,but having much difficulty.The external program i'm using is called the Foundation program.
    This Foundation program will use VHDL programming to create a virtual chip and then synthesising it.This program will then simulate the output of this VHDL program to verify that it is working as desired.Then the last stage is to download the whole VHDL program into a FPGA chip using a xilinx cable.
    All this need to be done using a labview program - to open the Foundation program and then extract the saved file and then to execute the download command to cause the VHDL program to be downloaded onto the FPGA chip.How do i go
    about doing all this?What is the first step i must do.Also all this have to be done thru networking..looks like its too difficult..I really need help.
    grays

    I haven't done VHDL so pardon my ignorance.
    LabVIEW can call external DLL via "Call Library Function" or C programs via "Code Interface Node", both located in "Advanced" function.
    If your program is a DOS program, use "System Exec.vi" found in "Communication" function. If you need to format your DOS command prior to sending it, use the "Format Into String" function in "String" function palette.
    Lastly, if you're trying to extract data, assuming it is text, use "File I/O" functions. If the data is binary, use "File I/O -> Binary File VIs".
    Hope that answers most of your questions.
    Shan Pin Koh

  • How can I control PIC programmer with LabVIEW

    I need to control a PIC Programmer (MPLAB PM3) with LabVIEW. How to do this?

    Hi Paul.
    I am working on a project that is using LabVIEW to communicate via serial communication with 4 programmers (Com 1, 2, 3, & 4). I am currently using the Microchip PM3 programmer DOS utility PM3CMD.exe to send/receive commands from the system exec.vi in LabVIEW. I am attempting to program simultaneously with 4 programmers, but the PM3 programmers are returning a database error if I try and communicate with more-than 2 programmers at a time. I noticed that you have some experience with some drivers from Microchip and using serial commands.
    Do you have any suggestions that may help me.
    Thanks.

  • How to display the serial waveform on Labview

    Hi,
    I'm a newbie in Labview Programming. Is it possible to display the serial waveform on the display using Labview?
    From
    Don

    RS232 transmits binary. If you transmit the character A, that gets converted to hex 41 or 01000001 (assuming 8 data bits). There is also start, stop, parity bits. The logic levels for RS232 can between +3 to +12 volts or -3 to -12 volts. When you use LabVIEW to read a serial port, the UART in the pc will convert that digital data back into the character A and that's what LabVIEW or any other communications program like Hyperterminal will read. What exactly do you have hooked up to the serial port of the pc? Is it some kind of instrument or what? If it's an instrument sending data, then how the data is interpreted is dependent on the instrument. It might send back a reading as text. A 1 volt measurment might be transmitted as the ASCII characters "1" and "v". Other instruments might encode the data differently. Measurements made over a serial port can be easily visualized. Plain text received over a serial port is usually displayed as text.

  • Problems with Serial Communication using Labview 6 and Solaris 8

    I am working on a Driver for a Temperature Controller. But I am stuck at the very basics. I am using Labview 6 and the platform is Solaris 8 on a SUN Ultra 60 Workstation. I can not get the Serial communication to work. When I am running raw (uncompiled) code it works (I can read from and write to ttya and ttyb) but once compiled I get error code 37 (device not found). I have tried the following steps to fix this with no luck.
    1) I made sure that the "serpdrv" file is in the same folder with the executable. I also make sure the serpdrv file is added as a support file when building the app.
    2) I changed from using traditional serial VI's to labview 6's new visa functions. With these "new" VI's when
    I try to initiliaze the visa device and wire a control to the "visa reference" input only 1 serial port shows up (ASRL2, missing ASRL1). I am not sure if this is part of same problem or whole new issue.
    3) I reinstalled both visa and labview 6.0.2 update hoping this would help with no luck
    4) I placed the following entry into the ".labviewrc" file
    labview.serialdevices: "/dev/ttya:/dev/ttyb"
    If anybody has had the same problem I would love to hear about it and if you have any solutions
    Jamie Shea

    Hi Jamie,
    1. Do you have NI-VISA driver installed on the machine on which you are running this executable?? If you are trying to run the executable on the same machine on which the development program has ran fine, then you can ignore this point.
    2. If you have done all the changes that are suggested by other discussions related to this topic, then try changing the Port input to Visa Serial Configure.Vi from a control to a constant and try it. In some case, I have seen this to do the trick. I think this point should solve your problem. If it does do tell me. :-))

  • Controlling pxi 7350 using labview software

    Hi,
    So i am a complete newbie when it comes to labview having only used it to control virtual instruments before and now i am the point where i want it to interact with real world items. Ok so here goes..... i have the latest labview development software and have also purchased a pxi1033 with a pxi4065 digital multimeter and a pxi 7350 motion controller integrated within.
    my problem however is that i want to be able to control my motors via the umi7772 interface but cannot seem to find the correct symbols on the labview software to utilise them, i would like to use labview to create a program that will turn the stepper and evaluate what is on the dmm and then turn accordingly this is way above my level on labview currently but if anyone has any ideas then any information is greatly appreciated.
    cheers
    james

    Hello Jamest6, 
    I have found some useful documentation that will help you get started with you 7350 and LabVIEW. 
    First of all here is a community example that you can take a look at. It is possible to download the example itself from the bottom of the page.
    Read Analog Input (AI) values from NI-Motion device 73xx : https://decibel.ni.com/content/docs/DOC-5617
    Then you can access these knowledge base articles for some more guidance : 
    How Do I Use the Digital Input/Output Lines on my 7330, 7340, or 7350 Motion Controller Card? : http://digital.ni.com/public.nsf/allkb/2D238C3BF101620C862573A60081BFFE?OpenDocument
    How do I control the analog ouputs from an NI PCI motion controller in Measurement & Automation Explorer?: http://digital.ni.com/public.nsf/allkb/04B940903BDD987C862579320083C6FF?OpenDocument
    Also using these manuals for both prducts will be of help to you : 
    NI 7330/7340/7350 Motion Controllers and
    P7000 Series Stepper Drives: 
    http://www.ni.com/pdf/manuals/372324d.pdf
    NI UMI-7774/7772 : http://www.ni.com/pdf/manuals/373359c.pdf
    Another great source for looking at or using example VIs is the  LabVIEW's Example Finder.  Go to Help » Find Examples... When that window pops ups, double-click Toolkits & Modules in the folder list, then double-click NI Motion Assistant.  I'm guessing the "Straight Line Move.vi" or "Blended Move.vi" would be most helpful to you, but you could read the descriptions of each example listed for a little bit more information about what the examples are doing.
    Hope these are useful! 

  • Need to control waterbath temp using labview via RS232

    HI,
    I am new to labview. I have labview 6.1. I need to control a thermo RTE7 water bath temp.  controler using labview.
    The water bath has to be connected to computer via RS232 port and the commands have to be given via binary values.
    The users manual for the bath has "hex" bytes that are to be converted
    to binary values to be passed to bath. If anyone has done this before
    or anyone can help me on this please let me know. Thanks,

    Use simply the recommandations given in the RTE manual. You don't have to convert to binary : that's something done by the hardware.
    For instance, to send the temperature setpoint to the controler, you have to send a byte string such as
    CA 00 01 F0 02 01 2C DD, where CA 00 01 is a header specific to the type of serial link you are using,
    F0 is the set temperature command,
    02 is the number of bytes expressing the temperature that you are about to send
    01 0C is the temperature in tenths of degree (here : 30°C = 300 tenth = 010C$
    DD is a check sum byte.
    The corresponding labVIEW program is as follow :
    Of course, do not forget to initialize the serial port before writing the string !
    Message Edité par chilly charly le 10-21-2005 06:21 AM
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Water bath.png ‏4 KB
    Water bath.vi ‏28 KB

  • How can I control a driver using Matlab?

    For a lab project I have to program in matlab a driver (esp300 by Newport - http://www.newport.com/store/product.aspx?id=3229) that commands a motorized stage of the same company. The interface is GPIB. I rather control the driver using only matlab, but if i can't - i wan't to use Labview as a connector between the two. any idea how can i do one of the above? I've got no idea where to start from. I'll thank to any given advise. 

    What is the analysis that ou need to perform. The resources that are available to you from within LV is very complete!
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How to implement a callback function using LabView's Call Library Function Node?

    I am trying to call a fuction from a SDK.dll library using the Call Library Function Node. The SDK was provided to
    me and I do not have the source code, just the .dll and .h files.
    The SdkSetPropertyEventHandler function has a callback fuction as one of its parameters. How do I implement the
    callback using the CLF node? I am a good LabView programmer but this is my first time using the Call Library
    Function Node. I have read all the info I can find on NI's web site and the discussion board but cannot figure
    this one out. I am using LabView 8.6.
    The SDK.h deacribes the function as:
    //  Function:   SdkSetPropertyEventHandler
    SdkError SDKAPI SdkSetPropertyEventHandler(
                SdkCameraRef                    inCameraRef,
                SdkPropertyEvent                inEvnet,          
                SdkPropertyEventHandler         inPropertyEventHandler,
                SdkVoid*                        inContext );
    //  Description:
    //       Registers a callback function for receiving status
    //          change notification events for property states on a camera.
    //  Parameters:
    //       In:    inCameraRef - Designate the camera object.
    //              inEvent - Designate one or all events to be supplemented.
    //              inPropertyEventHandler - Designate the pointer to the callback
    //                      function for receiving property-related camera events.
    //              inContext - Designate application information to be passed by
    //                      means of the callback function. Any data needed for
    //                      your application can be passed.
    //      Out:    None
    //  Returns:    Any of the sdk errors.
    A separate header file called SDKTypes.h contains the following data:
    typedef  SdkUInt32  SdkPropertyEvent;
    typedef  SdkUInt32  SdkPropertyID;
    typedef  void       SdkVoid;
    typedef  struct __SdkObject*    SdkBaseRef;
    typedef  SdkBaseRef    SdkCameraRef;
     SdkPropertyEventHandler
    typedef SdkError ( SDKCALLBACK *SdkPropertyEventHandler )(
                        SdkPropertyEvent        inEvent,
                        SdkPropertyID           inPropertyID,
                        SdkUInt32               inParam,
                        SdkVoid *               inContext );
    Thanks for your help.
    Alejandro
    Solved!
    Go to Solution.

    alejandroandreatta wrote:
    I am trying to call a fuction from a SDK.dll library using the Call Library Function Node. The SDK was provided to
    me and I do not have the source code, just the .dll and .h files.
    The SdkSetPropertyEventHandler function has a callback fuction as one of its parameters. How do I implement the
    callback using the CLF node? I am a good LabView programmer but this is my first time using the Call Library
    Function Node. I have read all the info I can find on NI's web site and the discussion board but cannot figure
    this one out. I am using LabView 8.6.
    Basically you do not do that. LabVIEW does not know pointers and certainly not function pointers. What you should do instead is writing a C DLL that implements the callback and also exports a function to be called by LabVIEW that translates between the callback and a LabVIEW user event. Look for PostLVUserEvent() here on the NI site to find examples how to do that.
    Rolf Kalbermatter
    Message Edited by rolfk on 02-11-2009 08:00 PM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to create an SQL Database using LabVIEW??

    Hi all,
    I have been using LabVIEW for quite a long time but now I am doing something which I am totally new to. I have a VI which gives out a table as output. What I am trying to do is, I want to create an SQL databse and save this table in the database and I want to pass the value of this table to the SQL Database once in  every 24 hours. As I dont have any knowledge of My SQL I am totally stuck.
    Can anyone help me by telling me how to do this.?? An example code will be well appreciated.
    Regards,
    Nitz..

    Hi Nitzz,
    what have you done and where do you have problems? Did you make a search here in the forum?
    http://forums.ni.com/t5/forums/searchpage/tab/message?q=create+database#message-list
    Mike

Maybe you are looking for