Labview control of LS331 using RS232 port

Hi All,
I want to control a Lakeshore 331 temperature control using Labview. I am using RS232 port. I found driver on NI website but I guess they are for GPIB. I was wondering how can I use them for RS232 port?
Or if I want to bulid my own VI, how do go about it? I would appreciate if someone provide me example for capturing device using RS232 port.

The driver is written for both GPIB and Serial. You should replace the "Old" Visa Open function in LSCI 331 Initialize per the instructions here and try it. Once that's done, just select the com port by clicking on the VISA Resource Name.

Similar Messages

  • Control Instrument using RS232 port

    I have tried to download the IVI driver of the Agilent E3633A that stated can communicate using GPIB or Serial.
    I tried to initialize the instrument but no successful.
    I used a twisted ( tx and rx swap) RS232 cable (female to female) to connect between the instrument and PC com port.
    Please help to advice on how to control the equipments using RS232 port inlabview. Thanks!

    Hello,
    Here's what you can do to verify that you have established communication with the instrument.
    First gather the relevant information:
    1. Find a command that you know your instrument "understands" (it is highly likely that it will understand *idn? which should prompt the instrument to reply with a description of itself).
    2. Verify the serial settings that your instrument uses by default, such as baud rate, number of data bits (likely 8), parity, and the number of stop bits. You can also verify what termination character the instrument uses (which it likely does); this is the last character you will need to send after sending the relevant command characters, and it will indicate the end of the command to the instrument so that it stops reading from the serial port. I doubt that the instrument is configured for flow control of any kind by default, so don't worry about that unless there is specific indication of this in the manual for your instrument.
    3. Verify the type of your cable; that is, you will need to connect pin 2 of your computer's COM port to pin 3 of your instrument's COM port, and pin 3 of your computer's COM port to pin 2 of your instrument's COM port. Some cables automatically switch these connections with the wires inside the cable, others are "straight through." You can bypass the cables altogether and just use wires to make the relevant connections initially; don't worry about a twisted pair at first, just keep the wires short and you should be ok (unless you are in a particularly noisy environment).
    Now build the LabVIEW program:
    1. Open a blank VI
    2. Navigate to and pin down the following functions palette on the block diagram:
    All Functions -> Instrument I/O -> Serial
    3. Place onto the block diagram the four VIs/functions in the top row in the order they appear (should be VISA Configure Serial Port, VISA Write, VISA Read, VISA Close); note that the open will be performed implicitly the property node inside the VISA Configure Serial Port VI (don't worry about this).
    4. Hover over the upper left hand terminal of the VISA Configure Serial Port VI, right click, and choose
    Create -> Constant; now select the PC COM port you connected your instrument to in the newly created constant
    5. Create constants for the inputs to match the serial parameters that you found for your instrument above if the default values don't already match. Note that the defaults used by this VI include activating the linefeed termination character to be used when reading, as well as standard settings for serial port which may already match your instrument (check by hovering over the ports with the wiring tool; the default values will show in parenthesis)
    6. Wire the top right hand terminal to the top left hand terminal of adjacent VI's (which should be in the order noted above); this connects the resource name to each so they perform the operations on the chosen serial port
    7. Wire the bottom left to the bottom right hand terminals in a similar fashion; this connects the error clusters
    8. Almost done... now hover over the remaining left input of the VISA Write function (called write buffer), right click, and create a constant; type *idn? (and include a linefeed character at the end by typing the key)in the string constant that you just created
    9. Similarly for the read function, create a constant for the input that indicates the number of bytes to read (perhaps make this number 100 as you will likely terminate the read appropriately when a termination character is read; your instrument will likely send this), and create an indicator for the "read buffer" output which will show you the string that is read back when you run the program.
    10. You should now be able to run the program; hope it works.
    I would have included a screenshot or example instead of a description, but I don't have access to that at this time and perhaps it is best to actually go through the process of building the VI anyway if you are new to LAbVIEW.
    Good luck and repost if you continue to have troubles!
    Thank you,
    Best Regards,
    JLS
    Best,
    JLS
    Sixclear

  • "How can i control the instrument with SCPI command by Borland C++ v3.1 using RS232 port"

    "hi....
    I've ever controlled some instrument by GPIB interface using Labview 6.0...it's really easy to implement .....but the problem is that i hvae to control those instrument under the pure DOS environment now ..so i have to abandon the using of GPIB interface and Labview ....then i choose the RS232 interface with programing the Borland C++ v3.1 and sending the SCPI command by bioscom()....but it got no response at all......so i am wonder if i can control those instrument by using RS232 interface and Borland C++ v3.1 to implement a pure Dos program????if yse,how can i do and is there any sample can be refer to ????
    thank you for you help"

    Hello Alvin-
    We do not have any sample code for programming RS 232 in C on our website. However, you may want to looks at these links for general troubleshooting tips for serial:
    Serial Communication Starting Point
    How to Do a Serial Loopback Test
    Regards,
    Ray Kong
    NI Applications Engineer

  • Capture Weigh Bridge Reading in ABAP Program through RS232 port

    Dear SAPers,
    I am in Cement Implementation Project and i have requirement to Connect Weigh Bridge to SAP ERP and capture the readings of that Weigh Bridge in ABAP program.
    How can i capture those readings in ABAP program or save them in a Z table using RS232 port????
    Best Regards,
    Kholoud
    Moderator message: please do not cross-post.
    Edited by: Thomas Zloch on Mar 17, 2011 1:22 PM

    Dear Vijay,
    I'm having the same problem in my implementation, the client needs me to capture the readings from Weigh Bridge through RS232 port directly to ABAP program.
    Could please tell me how did you solve this??
    Thanks
    Kholoud

  • 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 to use the Control lines of a parallel port as Input lines to be read using Labview ?

    The details are :
    NI Software : LabVIEW
    Version : 5.0
    OS : Windows 95
    NI Hardware : N/A
    Drivers : N/A
    CPU : Pentium
    RAM : 48
    Vendor : darcom
    Customer Information :
    SPEL TESTING
    SPEL, INDIA
    [email protected]
    Ph: (91) 4114 53818
    We do not have any DAQ cards within the PC. We have the parallel port which is EPP and ECP compatible having the address 278h on LPT2 and we are trying use this port for reading 8bit data from an external circuit. We developed a vi program in Labview 5.0 to control the parallel port.We tried with the Data lines to send signals from PC to external device through this parallel port with the addr
    ess 278h (which
    is Data lines) and it works fine. We also tried using reading 4bit data from external
    device to PC through this port with the address 279h (which is Status lines) and it
    is also working fine.
    But it was not possible for us to read through Control lines whose address is 27Ah. Whereas when line printer (dot matrix printer) was
    connected, it was possible for us to take print out. Thus printer was working. This
    informed us that the control lines are all OK!
    Can you please clarify, how to use both control lines and status lines to read 8 bit data through this parallel port using the Labview software.

    There are several Knowledge Base entries about this on the NI site, but probably the most detailed document is on the Advanced Measurements (www.advmeas.com) website. Try looking at this page, I think you will find it useful.
    http://www.advmeas.com/goodies/parallelport.html

  • How can I control instrument using its RS232 port in VB or VC++?

    1)How can I control instrument using its RS232 port in VB or VC++?
    2)What's the module or .h file need I add-in to VB or VC++?
    3)Can you provide me some easy examples for that?
    Thanks!

    Kevin,
    I've used Measurement Studio - Tools for Visual Basic and Tools for Visual C++ (ActiveX component) for instrument control.
    I've used both the VISA and non VISA versions and they are pretty straight forward to use for GPIB, Serial or VXI.
    You might find the following page useful.
    http://www.ni.com/mstudio/cworks.htm#ICC
    Regards,
    Kamran

  • How to Control 1 bit on a RS232 port?

    Using VISA can read or write data from RS232 port,if I want to control 1 line on RS232 High or Low? Does any VI can do this? Thank you so much.
    Message Edited by shunshin on 03-22-2007 12:23 PM

    Which line do you want to control? If it's one of the control lines like DTR or RTS, then yes. You use a VISA property node. Select Properties>Serial Settings>Modem Line Settings.
    Message Edited by Dennis Knutson on 03-22-2007 11:31 AM
    Attachments:
    Modem Line Settings.PNG ‏2 KB

  • Problems Reading/Writing Parallel Port Data, Status & control Registers Using In Port.vi and Out port.vi

    Hi,
    Can anyone there help me Please with the problem. I am trying to
    communicate with the parallel port using my program which i have
    attached to the message. I am running LabVIEW 7.0 Professional with
    application builder. All the program does is reads and writes to the
    three parallel port registers. It runs FINE!!! in my computer. But when
    i built an executable (see attached) and tried running on a different
    computer (with LabVIEW Runtime engine 7.0 installed) the program does
    not read/write to the registers. The target PC had the parallel port in
    SPP mode just like mine. I can't seem to understand whats going wrong?
    Can anyone please help me if you know the right answer.
    Thanks
    Attachments:
    Programs.zip ‏119 KB

    Hi Guys,
    I too have a problem using "Out Port.vi", but of a diferent kind. I use this VI to control the  Parallel Port which in  turn controls a small circuit. I use only two data pins, DP-2 and DP-4 for this purpouse. I use LV 7.1 Professional Development version in a Windows 2000 operating system. Now, my main problem is that my code runs fine (both is development and .exe forms) in my development computer, but when I try to run the .exe version in  other computers (Windows XP operating system), it asks for a "protocol file" while starting (look at the attached picture).
    Now, I really have no idea what kind of a protocol file it asks for and just click "ok" and proceed to work, the most interesting part is that the code works well as I expected. So, my only problem is that it asks for a protocl file which I want to avoid. As with the application building, I do all that is  required like including the sub VIs (self developed), creating an installer, enabling the port access, and creating a proper .ini fine. I also use the Out Port.vi from the AccessHW library.
    I have my doubts on two fronts,
    1) With the version conflict, since my development computer runs with Windows 2000 and my target computers all run with Windows XP
    2) With the Out Port.vi which further contains a small VI "Output Word to Port.vi" in it and that further contains Call Library Function Node, which might call soem external files, like what my problem is.(look at the attached picture)
    I don't have answers to these questions and may be my problem is in different place, but I would like to hear from anyone who could give me a helping hand. I am in a situation where I could not disclose my code.
    Thanks in advance,
    mohan
    Attachments:
    protocol file.zip ‏153 KB

  • Control Temperature of WATLOW using RS232..Got vi ? to begin with?

    Looking for vi which can help me conrol the temperature inside my little chamber (WATLOW) using RS232 port

    If you are looking for generic serial example programs, go to Help»Examples»I/O Interfaces»Serial»LabVIEW<->Serial. Enter the com port and set both dip switches in the up position.
    If you are looking for a instrument specific driver, you may want to contact the manufacturer to see if they have a LabVIEW driver for their instrument. If they don't, you can easily create a low-level driver by configuring an I/O assistant VI for each function in the manual. I/O assistant is one of the many new features of LabVIEW 7 and will parse instrument responses for you, which makes creating an instrument driver much easier. Once you have this low level driver you can just combine functions to make higher level VIs.

  • How do I use a LabView control element as ActiveX Control in another application?

    I am was trying to include some simple ActiveX Controls(sliders, buttons) in my VBScript. It worked with other ActiveX Components from the web, however I wasn't able to include the LabView ActiveX Controls because I was missing the necessary IDs. Moreover I was able to test the LabView control by inserting it into the VC++- Test Container. But I still can't find the necessary IDs...

    I don't believe that any of the LabVIEW controls (except for 3D Graphs) are ActiveX controls so I'm not sure what control you were able to insert into the VC++ container. What's the exact name of the control? NI does have ActiveX controls that are part of Measurment Studio so maybe it's one of those that you're using?

  • I want to use labview controls in VB ? how do i do it

    i want to use labview controls in VB ? how do i do it?

    The easiest way to do this is to create a LabVIEW DLL and call it from vb. So write a vi in labview with the front panel you want and then compile it into a dll. The only problem with this is that when vb calls the dll nothing else can happen in vb. Hope this helps.
    BJD1613
    Lead Test Tools Development Engineer
    Philips Respironics
    Certified LV Architect / Instructor

  • Using multi threading to access 2 RS232 ports

    Hi,
    I'm a beginner in multi threading, so this question may be a very basic one....
    I'm Using TS3.5 + CVI 8.01 to communicate withs 2 RS232 ports.  I thought to use mult threading so I can process 2 steps in parallel rather than in series. 
    This is what I do:
    1) I defined 2 subsequences, each of them call the same CVI function.  I use the sub sequence parameters to transfer the com number.
    2) My CVI application includes one dll for this specific project and another one, a general dll to handle RS232 functions.  The RS232 dll uses one global buffer than collects all the traffic on the com. 
    QUESTIONS:
    1) What happens when 2 seperate threads run the same function in the RS232 dll?  (in terms of memory etc...).  Does each one use a different buffer (in terms of memory allocation), or, both of them writes to the same buffer?   Obviously, if they writes to the same buffer, then, my function will not operate properly.
    2) What happens in TestStand after the 2 steps in new threads have finished their execution?  does the next step run back in the same threads the sequence run before?
    Thanks
    Rafi

    Rafi,
    Glad to hear you were able to make some ground on your application. As for all of your questions, I'll try to answer as many as I can.
    First, when you are talking about your global buffer, is it created in TestStand or in the DLL itself? When you use DLLs, global variables or global structures are shared between all threads that call your DLL. On the other hand, if your buffer is declared inside of the DLL it is global for the DLL but not shared and would be a separate buffer for each call.
    With your run-time error in TS, it would definitely be helpful to have more information about the error. From what you explained (executing fine on the first call, but failing on future executions), it sounds like the resource is not being released after the first execution.
    As far as a specific example for TestStand Multithreading, you'll want to look at the TestStand Development Library and, specifically, Multithreading in TestStand. If you look and browse through the Application Notes and Tutorials section, as well as the Technical Presentations section, you will learn a great deal about multithreading and what options you have in TestStand. For a specific example, you may want to look at This Example. You could also look in the <TestStand>\Examples (where <TestStand> is the directory where TS is installed) at the MultiUUT example for an example of multithreading in TS. These examples may not be exactly what you need, but they should give you a jump start.
    As far as making your DLL multithread safe, it is definitely not necessary; however, there are some significant advantages described in this article: Designing Thread-Safe DLLs. It is an MSDN article that focuses on Visual Basic, but it has some helpful information that can apply to C as well.
    Hopefully this can help you move further. I have attached a list of links at the end of this post with other helpful links for you as well. Keep us posted with your progress.
    Matt Mueller
    NI
    Links:
    General Information on Multithreading for C Programmers
    Building Multithreading Applications with LabWindows/CVI
    Multithreading in LabWindows/CVI
    Easy Multithreading Programming in LabWindows/CVI
    Multithreading for Rookies

  • How to use Expression Edit in the LabVIEW control (teststand category)?

    Hi All,
    I am developing the teststand specify module using LabVIEW. I found that is Expression Edit control in the Labview Controls pallete. does anyone have any example?
    I have enabled the expression browser button but I dont know how to link it to the teststand. Pls advise.
    Thanks
    - toko -

    Hey Toko,
    You basically need to refer the button to the sequence context.  For a great description of this and an example, please refer to this previous discussion forum:
    http://forums.ni.com/ni/board/message?board.id=330&message.id=10609&requireLogin=False
    Thanks,
    Andy McRorie
    NI R&D

  • Send command to modem using serial port and capture the response in the labview

    hello.
    I am doing my shool project.
    I want to send command to modem using serial port and get the response in the labview.
    When i run my program and enter"AT", only messy code will be displayed.
    can anyone help me? thanks 

    Dora0512 wrote:
    Thanks for you all. My partner got it already.
    I am doing send sms part.
    Can anyone tell me why my program is not so steadily?
    It means this program can run. But somtimes I cannot receive sms. sometimes can
    Basically, it is not well-written from both a LabVIEW and a communications point of view.  Unfortunately, I can't elaborate because today is an exrtremely busy day at work.  I'm hoping this bump will prompt someone to help you with your problem.  If you could also provide us with the programmer's guide or the manual for your equipment, that would be extremely helpful.
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

Maybe you are looking for

  • My "Puchased" list isn't showing up. How do I download my past purchases?

    When I click the Purchased tab, it just goes to a basic white screen.  None of my songs, movies, or anything will show up.  It's not my computer because I tried to access it on a different computer and it still didn't work.  Please help, I need to do

  • How to go back to calling screen???

    Hi experts, I had modified the Exit MV45AFZZ to display pop up message when we save a sales order. Now user after giving all the input in VA01 will go for SAVE button and after which pop up will occur. Now my problem is after displaying message it sh

  • Can´t open Preference (??)

    Can´t open Preference in iphoto anymore. Also have some problem with black pictures - but when I click them they show up - but corrupt (several pictures merged into one). I think the black pics is cause I used the Adobe RAW converter and made them b&

  • Patch related

    Hello, I have a doubt related to patch.Like i have applied many patches,but i am gettin any issues. My question is if the worker fails when we are applying patch will the patch stops or it will continue? 1)If i have 4 workers,if worker 1 fails,do the

  • IMovie "Finalizing a Project" timeframe

    Just bought new IMAC. I went to "finalize" my first iMovie project (in preparation for burning it to a DVD) and it said it would take 28 HOURS to "convert into an HD 1080p". 28 hours?!! Did I do something wrong? - I only created about a 90 minutes wo