Labview interfacing with NI cDAQ-9172

I currently have access to a NI cDAQ-9172 with a NI-9205 AI input
board and a NI-9481 relay control board. I basically have the DAQ
Assist tools for the analog inputs and the relay outputs, however, I'm
having trouble interfacing them together, such as if the two analog
outputs are above x Volts, turn on the relay control; otherwise, turn
it off. Do I need to create a task for a specific DAQ Assist tool in
order to control the behaviour of the relay outputs based on the
analog inputs?

Hello Stanley,
Let me try to address your questions in order:
1. LabVIEW gives you the ability to program several design patterns
including Finite State Machine, Master/Slave and Producer Consumer.
LabVIEW even provides templates for these design patterns, which you
can create by going to the File menu and selecting New.... The image below shows where you can select from the different design pattern templates.
For more information about the state machine design pattern specifically, I would recommend that you examine this tutorial.
2. I believe the "DAQmx Tools" you referred to are the DAQmx sub-VIs in
the DAQmx sub-palette. You must use the inputs (controls) and outputs
(indicators) to configure these VIs, there is no pop-up menu like there
is for the DAQ Assistant. However, you are able to generate the sub-VIs
from a configured DAQ assistant using the right-click menu, as shown in
the diagram below. This would allow you to configure your NI-DAQmx operation with the pop-up window, and then optimize performance using the DAQmx sub-VIs.
3. Based on the description of your application, I would strongly
suggest that you consider either the state machine template discussed
above or the NI LabVIEW Statechart Module. This module is designed to
give you a higher level of abstraction for complex systems. Since you
already have a flow chart, it seems that it would be pretty easy to
convert that to a statechart to programmatically implement it. You can
see a video here on how to implement state machines in the LabVIEW Statechart Module.
If you have questions about how to architect your program specifically,
I would recommend that you post to a new forum. You are more likely to
get better insight and more relevant information on that topic if you
post a new question that reflects the appropriate topic.
Message Edited by Matt A on 09-17-2007 07:37 PM
Matt Anderson
Hardware Services Marketing Manager
National Instruments
Attachments:
Generate NI-DAQmx Code.JPG ‏16 KB
Design Patterns.JPG ‏73 KB

Similar Messages

  • Labview interfacing with a multiplexer

    Hello,
    I would just like some help with figuring out how to set-up Labview to interface with a multiplexer. On my  ciruit board, I have an eight channel multiplexer which is connected to eight different-value resistors. What I would like is that on my front panel, there should be an drop-down control that allows the user to select any resistor that is connected to the multiplexer. So basically, Labview should be able to send binary information to the multiplexer, which would then select the appropriate resistor. I am fairly new with Labview and don't know how to go about this problem. Any suggestions will be appreciated.
    Thanks

    Hi,
    All the adress and enable inputs are TTL compatible  (the multiplexer that I'm using is the ADG608 from Analog Devices) and I am currently using the NI PCI-6036E/BNC-2110 starter kit. So, is there a way to implement the interface using this DAQ device? Can I use DAQmx to create a channel just as I would for a normal voltage signal? But I'm not sure how the interface will communicate with the multiplexer.
    Thanks

  • Labview interface with wireless camera

    Has anyone interfaced labview with a wireless webcamera? I have an application that needs to interface my existing labview program with a wireless webcam (802.11b) to monitor a certain space and display live video on the main labview screen.
    Thanks in advance.

    kmoorthy76107 wrote:
    > Has anyone interfaced labview with a wireless webcamera? I have an
    > application that needs to interface my existing labview program with a
    > wireless webcam (802.11b) to monitor a certain space and display live
    > video on the main labview screen.
    > Thanks in advance.
    Most probably your webcam comes with drivers for Video for Windows (VfW)
    or DirectX. In that case you can just use:
    Irene He's IVision Toolkit:
    http://www.hytekautomation.com/Products/ IVision.html
    or
    Pete Parentes WebCam library:
    http://www.cs.unc.edu/~parente/labview/ index.shtml
    The first is a rather impressive Video Manipulation library with a
    nice video capture interface to DirectX/VfW too, and the second is a
    simple video capture library to access any VfW compliant
    device.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Labview interface with micro contoller

    i am new to labview. I need to know whether DAQ card is needed to interface with micro controller? if no need then any one can you explain how to inter face microcontroller 89c51 with Labview...... if needed then explain how to interface?
    JAGADESAN ASOKAN
    J@G@De5@N
    Solved!
    Go to Solution.

    In general, no, you don't need a DAQ, because in your case, the uC is the DAQ. Your challenge is to set up an interface between the computer and the uC (whether using LabVIEW or anything else).
    In my opinion, the easiest way to accomplish that is to set up a serial interface with the uC, and use LabVIEW to control / read the uC serially using VISA. This would require the least amount of hardware and least cost. I2C, if available, is also a way to go if you have the interface.
    Richard

  • Using Counters with NI - cDAQ 9172

    Hi,
    I used to originally run a program with NI 6009 and used counters in LabView to measure vehicle velocity. I had 0-5 magnetic sensor connected to the PFIO terminal. I was essentially counting a falling edge and it worked fine in the NI 6009 module. But when I switched over to the NI 9206 (Fuel Cell) module having the same speed connected to the PFIO termainal I had problems using the counters. Does anybody have any suggestions as to how counters are to be used in the new cDAQ chassis. I found an article in the forums on how to go about selecting internal channels to show up the counters. But even after being able to select one I had no response on the program. Any ideas on waht could be tried to make the counters work?
    I have also attached my program if that helps.
    Thanks!
    Attachments:
    Eride_Main.vi ‏108 KB

    Hi Rahul,
    I want to correct my previous statement.  I believe that the following example will show you how to perform a counter task with the 9205.
    Regards,
    Jim Schwartz

  • Step by step Labview interface with XBee

    Hey,
    Im currently trying to interface my XBee modules with Labview. I have read the other posts on this subject and have not been able to link my XBee and Labview. I am very new to Labview and would be great to recieve more detailed and descriptive steps on this. Eventually I am going to connect Labview to an Arduino Fio, using two XBee. However for now all I need is successfull interface between labview and XBee. I need to send a signal, recieve it in labview, and send something back. 
    I am using USB explorer boards for connecting XBee's to my computer. I have alraedy configured XBee's using moltosenso network manager (same as XCTU). I cant get VISA wizard to see the USB port. 
    If anyone can explain thoroughly how to interface XBee to labview it would be great! thanks.

    Hello Theguat,
    Thanks for posting at NI forums! I’m linking some discussion forums and information on interfacing Xbee with LabVIEW.
    http://forums.ni.com/t5/LabVIEW/Xbee-using-labview/m-p/739214?requireLogin=False
    http://forums.ni.com/t5/LabVIEW/How-to-send-signals-through-XBee-connected-in-USB-port/m-p/2135382
    http://forums.ni.com/t5/LabVIEW/Connecting-labview-to-xbee/m-p/1070547?requireLogin=False
    https://decibel.ni.com/content/thread/15238
    https://decibel.ni.com/content/thread/10814
    Best Regards,
    Alina M
    Applications Engineering
    National Instruments

  • Labview interface with MongoDb or similar NoSql database

    Hello everyone. I was wondering if anyone has tried interfacing labview with MongoDb or another similair NoSql database? If so what are you experiences and how did you go about doing so?

    Hi landlord,
    Glad you found it useful so far!  In general, I use the MongoDB documentation C# examples and then try to 'match' them in the LabVIEW code.
    For queries it shows the following code:
    var query = Query<Entity>.EQ(e => e.Id, id);
    So I went looking for Query, which exists (MongoDB.Driver.Builders.Query) - but with no public constructor.  For fun, I tried placing a reference to this class and using an invoke node - this lists all the comparison types supported by MongoDB - some of which return a MongoDB.Driver.IMongoQuery.
    I've setup a "AND" query which takes an argument of an array of 'queries' - I've then modified the BSON document code to also return an array of it's BSON elements - you can then create a EQ query for each element and wire them through to the AND query builder.  Probably not optimal but hey, it works
    Regards,
    Peter D
    Attachments:
    MongoDB_LV_Remove.zip ‏525 KB

  • Labview Interface with Cognex

    Hello,
    We want to use Labview as interface visualization of data from an image processing done in Insight environment with a color camera from Cognex.
    What are the ways to recover data in Labview from Insight ?
    Thank you for your responses.

    Christian,
    Cognex In-Sight has nothing related to NI Insight except the name!
    Just two ideas: 
    For communication with Cognex as far as I know, you can use In-Sight OPC server. So, you should be able to get data from Cognex through LabVIEW DataSocket.
    For more deep communication you can use (probably) In-Sight Explorer SDK (but I don't know what is inside exactly).
    And this link may be useful for you:
    http://morethanfunctional.org/index.php?/archives/12-Running-Cognex-In-Sight-1721-in-LabView.html
    Andrey.
    Message Edited by Andrey Dmitriev on 05-19-2010 03:16 PM

  • Labview interface with Instron 3360 Series (for compressive test)

    Hello Forums!
    I have to write a LabVIEW code to read the Instron 3360 to compress a thin-walled cylinder. The cylinder is expected to withstand about 500lb. How do I go about doing this?
    - Thanks! 
    - gibiv (high school student)

    Can you tell me a little more about your application? More specifically:
    1. What is the input/output of the instrument you are using to measure force?
    2. Are you using NI Hardware to communicate with this device?
    3. What drivers are you using?
    4. What version of LabVIEW are you using?
    I have included some general information below about configuring a data acquisition system in LabVIEW. 
    Introduction to Data Acquisition: http://www.ni.com/white-paper/3536/en/
    R. Brill
    Applications Engineer
    National Instruments

  • LABVIEW interface with OOPIC microcontroller

    Hiya,
    I have problem received data from OOPIC microcontroller (www.oopic.com)to LABVIEW.But, I had tried on hyper terminal and it's work fine. Please advice as well do I need to use any associated files when communicate OOPIC with labview?

    Hi,
    This is also device specific. The serial port returns a string. More than a string, this is a byte array of whatever the serial port receives. It is convenient to represent the data as a string since most of the time the data sent is ASCII.
    You need to parse and format the string data. Parsing means getting the information you are looking for. You need to know how the device sends you the data and look for common elements. Formating means taking the ASCII data and passing it to numeric format. This depends on whether the device sends data in binary or ASCII format.
    Here are some links Keyword Search: Parse String VI.
    The important thing is having good documentation on how the device formats and packages the data send to the PC. This will allow you to decide what you can do with the data.
    This is more of a programming issue. you might get more answers in the LabVIEW forum for parsing and formating questions.
    DiegoF
    National Instruments,Message Edited by Molly K on 02-18-2005 11:07 PM

  • LabView interface with DLL that uses ActiveX

    I've written a DLL using Microsoft Visual Studio 2005. This DLL uses ActiveX (MSXML4.0). It works fine being called from other applications created in Microsoft Visual Studio. It crashes being called from LabView 7.1. By commenting out everything, I've figured out that it crashes on the call to ActiveX (no problems if this call is commented out). What should I do to make it work?
    I've tried using CoInitialize at the initialization of DLL; it didn't solve the problem.
    Additional information: DLL is using MFC in a Static Library, not using ATL, Character set = Not Set.
    The functions are defined in C calling convention (not __stdcall).
    Please help.
    Thank you.
    Irina Kaliniouk

    Thank you for your answer, but that is not the case. There is no UI in this DLL, but it is using some convinenient MFC classes, like threads, CString, etc. The threading really was not even involved in the example that crashed. The function that crashed was
    selectNodes on MSXML2::IXMLDOMNodePtr. Here is the code:
    MSXML2::IXMLDOMNodeListPtr selectNodes (LPCTSTR expression, MSXML2::IXMLDOMNodePtr pStartNode)
    CComBSTR quesryBstr (expression);
    return pStartNode->selectNodes (quesryBstr.m_str); //_bstr_t(expression));
    where the pStartNode was a root node of
    MSXML2::IXMLDOMDocument2Ptr m_pXMLDoc;
    hr = m_pXMLDoc.CreateInstance ("Msxml2.DOMDocument.4.0", NULL, CLSCTX_INPROC_SERVER);
    I commented out really everything except this function, so there was nothing to corrupt the memory or any other problems.  
    What can be of a problem?
    Thanks.

  • 9472 Error 50808 with cDAQ-9172

    I am using the module NI-9472 (digital output) to switch a din-rail Relay with 24V DC that is switching a 3phase contactor, but am I getting the error 50808 when using this module with the cDAQ-9172 on slot 1.
    I have tryed the same application, with the same 9472 module with cDAQ-9171 and everything is working ok. The problem only pressists with the cDAQ-9172 and only when I connect the cables from the 9472 module to the relays. If these cables are disconected, I never get the error, and the module LEDs work just fine.
    I am also posting the VI I am using in order to get some help, maybe I should do this in other way.
    Thank you for the help.
    Attachments:
    error.jpg ‏92 KB
    Test 2.vi ‏50 KB

    Hello,
    DAQmx returns these errors after the host PC's USB controller reports a USB transaction error. 
    To recover from this state, you may use this : Programmatically Reset USB DAQ device in LabVIEW
    The underlying issue could come from the host controller, the device, or even the USB cable. Some host controllers are more susceptible than others to encountering these transaction errors.  It is recommended to double-check your USB cable and if necessary try the device on a different host controller.
    You could try a different USB host controller (PCI USB host controllers cost typically between 20 and 30 dollars).
    You'll find all these information in the following document : Why Do I Receive Error -50405 or Error -50808 Using an NI USB DAQ Device When Inserting or Removing ...
    FYI, a customer who met the same issue get the 9172 working by using an externally powered USB hub.
    Regards
    Jérémy C.
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    Travaux Pratiques d'initiation à LabVIEW et à la mesure
    Du 2 au 23 octobre, partout en France

  • Encoder Speed with NI 9215 module and cDAQ-9172

    I've a NI cDAQ-9172 with the NI9215 analog input module, and I want to estimate the speed with an optical encoder (OMRON E6A2-CW3C). My approach was, making a comparison with a point in the midle of the high of the signal, ie 4V, making this way a perfect square signal with 1of high. After that I use the Tone Measurements and the Timing and Transition Measurements modules to calculate the frequency of the wave form, and this way I'm able to calculate the RPM speed.
    The problem with this solution, is that even with the engine at a constant speed of 746RPM, measured with a stroboscope, Labview give me a high variable values between 730RPM to 760RPM, and I can't solve this problem because I really need an accurate measurement.
    Should I buy for example the NI 9401 module to make this measurement? If so, does any one knows how to build a VI to get the encoder speed?
    In attach I send the VI that I'm using to calculate the speed.
    Thank you for help.
    Attachments:
    Encoder Speed.vi ‏112 KB

    Hi,
    The best way to measure a speed through a quadrature encoder is to use the counters that are inside the cDAQ chassis.
    With the 9172 chassis, you need a digital I/O module (9401) in order to access the counters.
    With the new generation of chassis (9178), you don't need the 9401 because you can connect your encoder signals to the BNC.
    Best regards,
    Thomas B. | CLAD
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    >> Inscrivez-vous gratuitement aux Journées Techniques : de l'acquisition de données au contrôle/com...

  • External trigger with cDAQ-9172

    Hi,
    I would like to synchronize my data collection between my EMG system (Delsys Myomonitor) and  my VI in LabVIEW. I have a trigger module (Delsys) and would like to use it to start my data collection in both systems. I have a NI cDAQ-9172.  Is there any ways I could start the data acquisition in LabVIEW?
    Thanks

    Which modules are you using in your 9172?
    Any DI module with 8 lines or less can be used to route trigger signals if placed in slots 5 or 6 (e.g. 9401 or 9402).  Alternatively, if you are using a 9205 or 9206 you may use the PFI to route the trigger signal from any slot in the 9172.
    Which modules are you trying to synchroinze?  The 24-bit C Series modules use Delta-Sigma converters which have special synchronization considerations.
    Best Regards,
    John Passiak

  • Arduino interface with labview: not able to upload lvifa base file

    guys, you have to really help me out on this one i have been at it for days. i am new to this so please help me out. i have an arduino uno with atmega8 on it and i m trying to interface it with labview but everytime i tried to upload the lvifa base file it shows and error, and it reads "XYZ is not declared in this scope".
    AFMotor.cpp: In function 'void initPWM1(uint8_t)':
    AFMotor.cpp:87: error: 'TCCR2A' was not declared in this scope
    AFMotor.cpp:87: error: 'COM2A1' was not declared in this scope
    AFMotor.cpp:88: error: 'TCCR2B' was not declared in this scope
    AFMotor.cpp:89: error: 'OCR2A' was not declared in this scope
    AFMotor.cpp: In function 'void setPWM1(uint8_t)':
    AFMotor.cpp:108: error: 'OCR2A' was not declared in this scope
    AFMotor.cpp: In function 'void initPWM2(uint8_t)':
    AFMotor.cpp:124: error: 'TCCR2A' was not declared in this scope
    AFMotor.cpp:124: error: 'COM2B1' was not declared in this scope
    AFMotor.cpp:125: error: 'TCCR2B' was not declared in this scope
    AFMotor.cpp:126: error: 'OCR2B' was not declared in this scope
    AFMotor.cpp: In function 'void setPWM2(uint8_t)':
    AFMotor.cpp:146: error: 'OCR2B' was not declared in this scope
    AFMotor.cpp: In function 'void initPWM3(uint8_t)':
    AFMotor.cpp:162: error: 'TCCR0A' was not declared in this scope
    AFMotor.cpp:162: error: 'COM0A1' was not declared in this scope
    AFMotor.cpp:162: error: 'WGM00' was not declared in this scope
    AFMotor.cpp:162: error: 'WGM01' was not declared in this scope
    AFMotor.cpp:164: error: 'OCR0A' was not declared in this scope
    AFMotor.cpp: In function 'void setPWM3(uint8_t)':
    AFMotor.cpp:184: error: 'OCR0A' was not declared in this scope
    AFMotor.cpp: In function 'void initPWM4(uint8_t)':
    AFMotor.cpp:202: error: 'TCCR0A' was not declared in this scope
    AFMotor.cpp:202: error: 'COM0B1' was not declared in this scope
    AFMotor.cpp:202: error: 'WGM00' was not declared in this scope
    AFMotor.cpp:202: error: 'WGM01' was not declared in this scope
    AFMotor.cpp:204: error: 'OCR0B' was not declared in this scope
    AFMotor.cpp: In function 'void setPWM4(uint8_t)':
    AFMotor.cpp:224: error: 'OCR0B' was not declared in this scope
    I tried different arduino IDE versions as well, it not working out.
    Thanks!

    https://decibel.ni.com/content/groups/labview-interface-for-arduino?view=discussions

Maybe you are looking for

  • [SOLVED] Gnome 3 starts in fallback mode.

    I was using Gnome 3 with no problems until I restarted today, it goes straight to fallback mode now, it says there's something wrong with the graphics driver. Here's my Xorg.0.log [ 16.480] This is a pre-release version of the X server from The X.Org

  • Can't close a PDF

    I have an Ipad2 with latest OS. I opened a pdf in dropbox and can't close it.  Is there a fix for this?

  • USB AM10 Valet no 802.11n in Windows 8.1

    Connects at 802.11g OK but the speeds are lacking. Not even an option to enable it under it's properties. Am I missing something?

  • How to combine sound with video to an AVI Using IMAQ?

    I need to combine sound with video I capture and write it out as an AVI. Is there anyway in Labview to combine sound with and AVI? Or an easy to use third party product?

  • Pse6 upgrade

    I am thinking about upgrading to pse 9 but see a lot of problems being discussed with pse 9. Is pse 9 that much better than pse 6 or 7? Also if I do upgrade, will it covert all of my pse6 files without causing problems?