Lego and DAQ

Hello there, I am using a sensor attached to the SCB 68 connecting block of my PCIe 6321 NI X DAQ device.
Is it at all possible to connect lego NXT to the same connecting block so as to use the sensor and lego NXT together in Labview?

Hi Jolanta,
I have created a quick VI that shows that you can read data from a PCI DAQ Card and read data from an NXT sensor within the same VI. Therefore it should be possible to read your sensor data and control your NXT motors.
Please let me know how you get on.
Regards,
Ben B.
Applications Engineer
National Instruments UK & Ireland
"I've looked into the reset button, the science is impossible!"
Attachments:
NXT with DAQ.vi ‏58 KB

Similar Messages

  • How can I configure NI PCI 6221 and DAQ SCB-68 for pressure sensors?

    Hello
    everybody,
    I am using the measuring board (NI PCI 6221) and DAQ
    SCB-68 for the data acquisition.
    With the DAQ-Assistant I created AI for the voltage of
    pressure sensors. In a big indicator panel from this DAQ-Assistant I see the
    voltage for both sensors in the correct size. But if I set sensors in the
    blockdiagramm to control the signals for sensor one I get a wrong voltage size
    and for sensor 2 nothing.
    How can I configure this data acquisition equipment to
    get the correct signals?
    Thanks a lot for your help.

    I do not know the type of sensor you are using. But pressure transducers may have a very low output voltage(in the mVolt range). They also need an excitation voltage. Here is an introduction. http://focus.ti.com.cn/cn/lit/an/sloa034/sloa034.pdfThen working with pressure sensors I always use 3 stages in the circuit.
    1 Instrumentation Amplifier as a preamp
    2 filterstage
    3 Final amp and output buffer
    (you may combine stage 2 and 3)
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • Synchronizing serial and daq data

    Hi,
    I'm attempting to acquire simultaneous data from a serial port and a NI USB-6211 board.
    I wish to write the data simultaneously and at every second.
    At first the I couldn´t acquire the data as i wanted because there were delays in the acquisition, but then I separeted both serial and daq in two loops and it was solved. However now I can´t manage to write the data simultaneously into the file.
    Any Ideas?
    Thank you.
    Solved!
    Go to Solution.

    Would it be possible to post your code?
    You could sync your loops with a "wait until next ms tick with a value of 1000.  This would cause both loops to execute once ever second at at the same time.
    It sounds like you now have a problem of writing the data to a file at the same time.  You could put for file write in a third loop and transfer your data from the other two via queues or functional globals and then write to the file when both peices of data are ready.
    Gregory Osenbach, CLA
    Fluke

  • Spectrum analyzer with sim and DAQ IV File

    Hello..
    i have a project that i need to design a Spectrum analyzer with simulation mode and DAQ option. ( so you can generate input signal from LabView and DAQ.
    all i look for is a modern Spectrum anlyzer VI file for reference and education purposes
    i know there are examples out there in LabView but, i need a modern one with a lot of options and features ( like Impulse respond, marker... filters.....)
    there is something i found here on the website, it happen long time ago, and some proffessor from Vietnam created such project. its not with DAQ, but its great for me.
    here is the link:
    http://digital.ni.com/worldwide/singapore.nsf/web/all/42B390E4624228D486257249001A5349
    this kind of Spectrum anlyzer looks great
    most appreciate for any help

    Hi Eldad,
    Thanks for posting and welcome to the NI forums!
    The
    application you have linked uses LabVIEW to control a Tektronix TDS220
    over RS232 (a.k.a. serial port).  The TDS220 has a 1GHz sample rate
    with a 100 MHz bandwidth--the specs on our DAQ devices don't go nearly
    this high, our High Speed Digitizers
    would be a better option if you need something comparable.  Also, the
    programming of the two devices (TDS220 vs. DAQ) is going to be quite
    different, so I am not sure how helpful the code from the link would be
    for your application.  I don't have access to the code or permission to
    post it here, but you could always try contacting the original author
    (his contact info is in the link you provided, not sure if it's up to
    date or not).  Again, I'm not really sure how helpful the code would be
    for you.
    You might want to take a look at the following example to see if it does what you need:
    NI-DAQmx: Benchtop Spectrum Analyzer
    There
    are also numerous examples that are installed with the DAQmx Driver to
    help you get started with the API.  You can access them from LabVIEW by
    going to:
    Help >> Find Examples... >>  Hardware Input and Output >> DAQmx
    There
    may not be a ready-made example that will do everything that you
    require, but the above should give you a good starting point for
    implementing the necessary features yourself.  If you run into any
    specific issues while trying to program, please don't hesitate to post
    to the forum and we'll be more than happy to help out.
    -John
    John Passiak

  • How to measure the resistnace of wire without any current input by lab view and DAQ-9172

    i want to measure the resistance of the SMA wire without any current in put by LAB view and DAQ-9172 any body help me

    You could measure the time constant of a resistor/capacitor series circuit. Basic electrical engineering: http://en.wikipedia.org/wiki/RC_time_constant

  • Driver Aeroprobe for MAX and DAQ

    Hi eveybody
    I am currently using a ATX4K-7 (AEROPROBE) computer, but I'm looking for making a connection between the CPU given by Aeroprobe and DAQ from LabVIEW.
    This CPU is used to sense 7-hole pressure probe. And I want to use LabVIEW and DAQ to get speed plots
    However, when I try to find a driver to install in LabVIEW, the different choices does not include Aeroprobe  (or Althen).
    Could someone give me the choices to do, so I can find the right driver to download? or is there a driver that can be used for several CPU.
    Thank you in advance
    Kind regards

    Check with the vendor to see what they might have. Otherwise, you will need specs on the communication interface and then write your own driver.
    p.s. How is this related to NI Academic products or did you post to the wrong board?

  • Synchronisation of frame grabber and DAQ board

    I want to aquire images and analog voltage signals at the same time, and synchronised, using a NI PCI-1428 Camera Link frame grabber and a NI PCI-6014 DAQ board. Can this be done using the RTSI trigger functions? I know that the frame grabber supports this, but what about the DAQ board?
    How about synchronising a NI-board with a non-NI frame grabber?
    Thanks a lot!
    Peter

    Hi, Peter,
    No, the PCI-6014 DAQ board does not support RTSI. However, most of the low-cost E-series NI data acquisition cards do support RTSI, such as the PCI-6024E or PCI-6036E, so you might consider using one of those boards instead.
    If you decide to go that route, there is a useful tutorial that describes the signals that can be routed over RTSI for NI DAQ and IMAQ boards:
    Developer Zone Tutorial: Synchronizing Motion, Vision, and Data Acquisition
    as well as several example programs:
    Developer Zone Example: Integra
    ting IMAQ and DAQ with Single Display
    Developer Zone Example: Low-level Triggered Ring (with DAQ-supplied triggers)
    As for a non-NI frame grabber, that would really depend on what support the frame grabber has for timing and synchronization. You could route a trigger signal or scan clock out over the PFI pins on the PCI-6014, but you would need to see if the frame grabber is designed to receive these types of signals.
    I hope that helps!
    Best regards,
    Dawna P.
    Applications Engineer
    National Instruments

  • FPGA and DAQ card synchroniz​ation

    Hi, we are controlling and acquiring data from multiple hardware devices (including translational stages and photodetectors). Until last week, we used to peform all control and acquisition using a PCIe 7852R FPGA board. However, we decided to switch the acquisition part to a PCIe 6363 DAQ card to improve the voltage resolution. During testing, I found that the internal clocks in the FPGA and the DAQ cards are slightly mismatched (not just a phase delay, but a difference in time-period).
    I know this because I generated a square wave (period = 20us) using the FPGA and acquired it using the DAQ card (at a rate of 200kHz, i.e., 1 sample every 5us). I observed that the acquired square shifts by 5us every 5 seconds or so. Such a shift does not occur if the generation and acquisition is done using the same board. Therefore, the only explanation is that the clock frequencies of FPGA and DAQ cards differ. According to my calculation, percentage difference between their clock times must be 5us/5s = 0.0001%. 
    Therefore, I am wondering if there is anyway to synchronise the clocks between them. Or, is there a way I can drive the DAQ device based on the FPGA clock, or vice versa? Also, please let me know if there is something trivial that I have fix.
    Thank you very much.
    Regards,
    Varun
    Solved!
    Go to Solution.

    Hi GerdW,
    Thank you for your reply. 
    I understand both solutions you have suggested. I had conceptually thought about the first one (to control the sampling rate). However, I still haven't figured out how to accurately generate a 200kHz square wave - I think I can figure that one out this morning.
    However, I am unsure how to implement the second option. I presume the default internal clock inside the DAQ is running at 100MHz or so. Therefore, inorder to obtain the same performance while using an external clock, I would have to generate at least a 80MHz TTL clock-out from the FPGA. Could you please tell me how I can do that? I couldn't find any clock-out capabilities on my FPGA. Or would I have to generate a clock of my own using Single-Cycle-Timed-Loops?
    Not only did you provide two different solutions, your reply suggested that I wasn't wrong in interpreting that the clock periods of our FPGA and DAQ must be slightly off. 
    Thank you very much.
    Regards,
    Varun

  • Simultaneous Video and DAQ Start

    Pardon my ignorance in the signals world, but I'm having a hard time trying to simultaneously start a video camera and DAQ hardware.  Hopefully someone can provide some insight.
    I will be using a standard camera that accepts triggering and a cDAQ chassis.  I know that I need to use DAQmx for the DAQ (I have a lot of experience with this), but I've never done triggering before in DAQmx.  How do I perform triggering with DAQmx to send the camera a TTL signal to start taking video?  What hardware will I need to send this signal?  Thanks in advance.
    Nathan - Certified LabVIEW Developer

    Nathan,
    What kind of camera bus are you using; USB, FireWire or GigE? Are you able to acquire images with your camera in Measurement & Automation Explorer (MAX)?  Here is a link to a community example that Grabs and Saves to AVI using IMAQdx.  If the camera has digital i/o lines to accept the TTL signal pulse you can run the example I've linked to and configure it for a triggered acquisition in MAX.  The camera's user manual should specify which pins are trigger lines or whether a specific i/o cable are terminal block is necessary.  If the camera supports triggered acquisition you can go into MAX select the camera under Devices and Interfaces the select it's Camera Attributes Tab.  There should be an attibute called "trigger mode" and its default setting is off so you would need to turn it on.  If there are multiple trigger lines, you would need to specify the "trigger source" under its allotted attribute.  Some cameras can only trigger the start of an acquisition while others can also trigger each frame acquisition.  You can specify whichever you'd like under the "Trigger Selector" attribute.
    Once the camera is configured to trigger I would have it perform its image acqusiition in it's own loop as in the example I linked then have the DAQmx tasks perform the data acquisition in a separate loop.  Then all you would need to do is synchronize your data acquisition to a single pulse generation task and wire the pulse output to your trigger line.  If you wish to control the acquisition of each frame you would need to generate a pulse train to the desired frequency for you application, however you would need to be cautious of the cameras limitations on how many frames per second it can acquire at.
    Regards,
    Isaac S.
    Applications Engineer
    National Instruments

  • A problem with delays in timed loops and DAQ

    I am programming a simulation for nuclear rewetting for a visitor centre at my company in Switzerland. It involves heating a "fuel rod" and then filling the chamber with water. The pump automatically starts once the rod core reaches 750C. After this, a requirement stipulates that flow rate be checked to ensure the pump is operating at the necessary conditions. If it isn't, the heater must be shutdown to avoid, well... meltdown. However, we must allow 10 seconds for the pump to respond, while still allowing a DAQ rate of 10-100Hz.
    The challenge is that I can't add a delay in my main loop else delay all acquisition, but I can't figure out how to trigger a peripheral loop (with DAQ for the single channel of checking flow) from the main loop, and when the peripheral loop determines if flow has initalised, respond back to the main loop with the okay.
    I think much of my confusion is in the interaction of the loops and the default feedback nodes that labview is putting in willy nilly. Would the only solution be to have two 'main' loops that don't communicate with eachother but rather do the same thing while operating on different timing? Tell me if you want me to post the file (although its on an unnetworked computer and I didn't think it would be too useful).
    Thanks+ Curran
    Solved!
    Go to Solution.

    Here it is! It is not in any form of completion unfortunately.
    So reading in the temp with NI9213 and watercolumn height with NI9215, we determine to turn on the pump with NI9472. NI9421 determines whether the pump is on (there is flow) and I must respond accordingly.
    I have 3 scenarios similar to this one as well, so having redundant loops with different timing like I mentioned would be way to heavy. I think I may have though up of a solution? At the time the pump is initiated, we record the iteration and wait for a number of iterations that correspond to 10s to pass before fulfilling the pump shutoff requirement?
    Attachments:
    rewettin1.vi ‏15 KB

  • Inconsistent frame and DAQ rate

    Hi,
    I have written, LabVIEW 7.0, a code (attached) to read from a DAQ card, 3 Visa's and 2 Firewire cameras. Before I included the cameras, everything worked fine. With the cameras, the performance decreases with time (the longer the acquisition time is, the lesser the frame rate). My questions:
    1. How can I optimize the code more, to give me the highest possible frame rate?
    2. Is my approach in getting capturing the images an "OK" way, or is there a better way in doing it? This is my first time 'playing' around with IMAQ 1394.
    3. I have a hunch that if I save every images once it is in the buffer, instead of capture everything first and save later, would increase the performance. Can this be true?
    4. Last, is there a quick and ea
    sy way to produce an AVI file from the recorded images? I realize that the elapsed time between the images is different and this cause an additional headache in producing the AVI file.
    By the way, the desktop I am using is a P4 2.4 GHz, with 1024 MB of RAM (if I'm not mistaken). I hope what I said make sense here and I highly appreciate all the help I could get Thanks!
    Shazlan
    Attachments:
    NIPost.llb ‏539 KB

    Shazlan,
    The first thing you can do to optimize your code would be to use only one IMAQ create. In your code the IMAQ create is inside the loop so you will be using more and more memory as the program runs. I have attach an example with 1394 that I wrote. It has only one IMAQ create. The example also has a implemented a save to AVI for saving the images. I hope this help
    A. Talley
    Applications Engineering
    National Instruments
    Attachments:
    Grab1394_and_Save_to_AVI.vi ‏102 KB

  • Acquire encoder position with Motion and DAQ

    Hi,
    I am trying to acquire an encoder position with Motion. It seems impossible to set the frequency of the acquisition with Motion and I must poll for the position in a do-while loop.
    I have read in a lot of threads that one can use RTSI lines to retrieve encoder position with a DAQ Board though it is acquired with a Motion board. But there are no examples at all about this.
    To sum up, I need to send Encoder Phase A to RTSI0, Encoder PhaseB to RTSI1 (which I already do), retrieve info with a DAQ device and then calculate rpm.
    Christophe
    PS: please don't answer with measure angular position.vi or explain me in what this Vi can help me

    Hi Christophe,
    I'm not sure I understood well what you need. You have the angular position and you need to know the timing, am I right? Can you use an other counter on your card to get the period (or the frequency) of your signal? From that, I think you should be able to calculate the velocity.
    I hope this helps,
    Charlotte F. | 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;}
    >> "Du 11 octobre au 17 novembre, 2 sessions en parallèle : bien démarrer - approfondir vos connais...

  • How to synchronize NI-Scope and DAQ

    I use a PXI-1042 System with a PXI-5124 Ni-Scope Card and a PXI-6120
    with traditional DAQ controlled by a PC running WinXP and LabView 7.0
    The intention of this setup is to make synchronized acquisition with
    both cards with different sample rates. For the sake of an example let's
    assume the NI-Scope runs at 100MS/s and the DAQ (6120) with 100kS/s. The Trigger is generated by
    analog triggering of the 6120. I'm looking for a solution to garanty
    that for a STOP trigger with post-trigger scans the last sample of the
    6120 coincides in time with the last sample of the NI-Scope 5124 card.
    Or to put it in more general terms a way to identify which of the 1000
    Samples the 5124 Card takes in the sample interval of the 6120
    coincides with the respective sample of the 6120 ? The point is to have
    a time resolution (for phase difference measurements) better than that
    given by the samplerate of the PXI-6120.

    Here you can find an example that shows how to synchronize a DAQ-Device with a Scope-card:
    http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3E2C556A4E034080020E74861&p_node=175382&p_source=External
    Hope this helps.

  • Control Design and Simulation and DAQ

    I'm learning Control Design and Simulations. I have some questions about it.
    1. For System Identification use, we can find the transfer function/model of the system by feeding data measurement from the system. But, how long data do we need to be sufficent for Identification System to estimate the model? Until the get saturated value (steady state)? or any other intervals? What if the system is unstable? How will Identification System Toolkit estimate that case?
    2. For connecting to hardware, we just connect the clock in the simulation loop to the hardware? And the simulation loop will simulate the blocks inside once it got the trigger/data from the DAQ? what about the step time and solver? Do they follow the timing from hardware? or they will run on their own supplied values/clock?if we use USB DAQ, we can't have any clock from it (as far as I know it's because USB connection is not that stable for clocking since it might be any jitters or delays.) So, how do we configure the timing parameter for USB DAQ?
    3. There is possibility to convert model in transfer function to state space, how do we know the states inside that conversion?
    Any helps would be great...
    Thanks in advance...

    Dear Chin ho,
    After going through your questions I found some documentation which will be useful for you. But I you still have more questions, you can reply me any time.
    1- About the data and amount of it I couldn't find any info but maybe you can use the new functions in LV version 2009 and find your answer.
    Estimating States of Nonlinear Stochastic State-Space Models with Extended Kalman Filters
    In previous versions of the LabVIEW Control Design and Simulation Module, you can use the Discrete Kalman Filter function and the Continuous Kalman Filter function to estimate the states of a linear discrete or linear continuous stochastic state-space model, respectively. In the LabVIEW 2009 Control Design and Simulation Module, you can use the Continuous Extended Kalman Filter function and the Discrete Extended Kalman Filter function to estimate the states of a nonlinear continuous or a nonlinear discrete stochastic state-space model, respectively.
    The Continuous Extended Kalman Filter function and the Discrete Extended Kalman Filter function estimate model states of a partially observable plant based on noisy measurements. First, use the SIM Discrete Nonlinear Plant Model template VI or the SIM Continuous Nonlinear Plant Model template VI, located in the labview\templates\Control and Simulation directory, to define the system model. Then use the the Discrete Nonlinear Noisy Plant function or the Continuous Nonlinear Noisy Plant function to simulate the discrete or continuous nonlinear model, respectively, with the addition of noise. Finally, use the Continuous Extended Kalman Filter function or the Discrete Extended Kalman Filter function to estimate the states of your model.
    The Continuous Extended Kalman Filter function and the Discrete Extended Kalman Filter function linearize the nonlinear system either by calculating a Jacobian matrix internally or by using an external Jacobian matrix that you define. Use the SIM Continuous Jacobians template VI or the SIM Discrete Jacobians template VI, located in the labview\templates\Control and Simulation directory, to define an external Jacobian matrix.
    Refer to the LabVIEW Control Design User Manual, accessible by navigating to the labview\manuals directory and opening CD_User_Manual.pdf, for more information about estimating the states of nonlinear stochastic state-space models with extended Kalman filters.
    2- I think that I found a pdf document about this part of your question which will be helpful. If you would like to give your email address, I can send it to you.
    3- About this part you can check the help function in LabVIEW when you open the "CD Convert Transfer function To State-space" function in your front panel.
    I pasted some info about the mathematic part below.
    The LabVIEW Control Design and Simulation Module provides tools to study the dynamics of systems described by linear time-invariant (LTI) continuous and discrete models. You can create deterministic state-space, transfer function, and zero-pole-gain models. You also can create stochastic state-space models and the second-order statistics noise models.  You can use these forms to describe both single-input single-output (SISO) and multiple-input multiple-output (MIMO) systems.
    Continuous transfer function and zero-pole-gain models use the s variable to define time, whereas discrete transfer function and zero-pole-gain models use the z variable to define time.  Continuous state-space models use the t variable to define time, whereas discrete state-space models use the k variable to define time. 
    Deterministic State-Space Model
    Continuous
    x(t) = Ax("t) + Bu(t)
    y(t) = Cx(t) + Du(t)
    Discrete
    x(k + 1) = Ax(k) + Bu(k)
    y(k) = Cx(k) + Du(k)
    Stochastic State-Space Model
    Continuous
    x(t) = Ax(t) + Bu(t) + Gw(t)
    y(t) = Cx(t) + Du(t) + Hw(t) + v(t)
    Discrete
    x(k + 1) = Ax(k) + Bu(k) + Gw(k)
    y(k) = Cx(k) + Du(k) + Hw(k) + v(k)
    Second-Order Statistics Noise Model
    Q = E{w . wT} – E{w} . ET{w}
    R = E{v . vT} – E{v} . ET{v}
    N = E{w . vT} – E{w} . ET{v}
    where
    t is continuous time.
    k is the model sampling time multiplied by the discrete time step, where the discrete time step equals 0, 1, 2, …
    x is the model state vector.
    u is the model input vector.
    y is the model output vector.
    w is the process noise vector.
    v is the measurement noise vector.
    A is an n × n state matrix of the given model.
    B is an n × m input matrix of the given model.
    C is an r × n output matrix of the given model.
    D is an r × m direct transmission matrix of the given model.
    n is the number of model states.
    m is the number of model inputs.
    r is the number of model outputs.
    G is a matrix relating w to the model states.
    H is a matrix relating w to the model outputs.
    Q is the auto-covariance matrix of w.
    R is the auto-covariance matrix of v.
    N is the cross-covariance matrix between w and v.
    E{} denotes the expected value or the mean of the enclosed term(s).

  • Magma-box and DAQ PCI 6034E card

    I had installed a magma-box (64-bit 2 Slot Series) on my laptop. And I installed NI-DAQ 7.1. Than I had plug the PCI-6034E card in the magma-box. My laptop identify the PCI-6034E daq card in the Device Manager; but with a yellow exclamation point and give the Error code 10 (Cannot start the device). The same used with the PCI-6377 card.
    I have tried with the cards in the differend slots.

    Hey Wim,
    I am not sure what a magma-box is. I have searched all over google and I haven't been able to find one. This brings up my next question of how you are installing a PCI-6034E and PCI-6377 on the laptop. National Instruments driver does not support this and I am pretty sure the DMA on the devices wouldn't work as well. The main difference between the PCMCIA devices National Instruments sell and the PCI devices is the DMA channels. If you need to use a laptop I would recommend purchasing the DAQCards or DAQPads that can connect to USB, Firewire, or PCMCIA slots. These devices are supported on laptops. The PCI devices are designed to work on desktop computers with standard PCI busses that allow for DMA channels and ISA based interrupts.
    I hope
    this helps out.
    Joshua P.
    Application Engineering
    National Instruments

Maybe you are looking for