I seek exemple of codes in labview for programming a robot

Hello,
I have a project and i seek codes programming in labview for move an lego mindstorm.  It's for have an idea on how use labviex for move or turn the robot
Thanks 

Have you tried the vi's contained in the NXT Toolkit?  It has most of the NXT-G blocks, including Move and Motor.

Similar Messages

  • Integrating C code into labview for ARM

    Hello,
          I wish to use the library functions written by Luminary engineers for their cortex-m3 controllers. If i wish to use these libraries written in C language in Labview, what i should do? There are large number of labraries are available in their websites. If any one has implemented these libraries in labview please write to me. 
    Nabhiraj

    I would also check the Using External Code in LabVIEW manual, found here
    Bilal Durrani
    NI
    Bilal Durrani
    NI

  • I Seek code for programming lego minstorm with labview

    Hi,
    I'am building a car with lego mindstorm for a project and i seek code for programming my car with labview. If you already use labview for programming lego mindstorm, can you send exemples codes for see how the car do for move or turn. please.
    Thanks 

    duplicate post
    duplicate post
    Please try to keep your question to one thread. Otherwise people don't know where to respond. 

  • I am trying to integrate simulink model (.mdl) file with SIT of Labview for RCP and HIL purpose. I am using Labview 8.6, Simulink 6.6 with RTW 6.6 and RTW embedded coder 4.6 ,Visual C Express 2008 and Visual C++ Express 2008.

    I am trying to integrate simulink model (.mdl) file with SIT of Labview for RCP and HIL purpose. I am using Labview 8.6, Simulink 6.6 with RTW 6.6 and RTW embedded coder 4.6 ,Visual C Express 2008 and Visual C++ Express 2008. I have selected system target file as nidll.tlc,make command as make_rtw and template nidll_vs.tmf. When I try to generate .dll file I get the following error.
    Attachments:
    SITProblem.JPG ‏101 KB

    Hi,
    No . I could not solve the issue. Presently we are using microautobox (from Dspace)for doing the RCP.
    Himadri 

  • LabVIEW for ARM 2009 Read from text file bug

    Hello,
    If you use the read from text file vi for reading text files from a sdcard there is a bug when you select the option "read lines"
    you cannot select how many lines you want to read, it always reads the whole file, which cause a memory fault if you read big files!
    I fixed this in the code (but the software doesn't recognize a EOF anymore..) in CCGByteStreamFileSupport.c
    at row 709 the memory is allocated but it tries to allocate to much (since u only want to read lines).
    looking at the codes it looks like it supposed to allocated 256 for a string:
    Boolean bReadEntireLine = (linemode && (cnt == 0)); 
    if(bReadEntireLine && !cnt) {
      cnt = BUFINCR;    //BUFINCR=256
    but cnt is never false since if you select read lines this is the size of the file!
    the variable linemode is also the size of the file.. STRANGE!
    my solution:
    Boolean bReadEntireLine = (linemode && (cnt > 0));  // ==
     if(bReadEntireLine) {    //if(bReadEntireLine && !cnt) {
      cnt = BUFINCR;
    and now the read line option does work, and reads one line until he sees CR or LF or if the count of 256 is done.
    maybe the code is good but the data link of the vi's to the variables may be not, (cnt and linemode are the size of the file!)
    count should be the number of lines, like chars in char mode.
    linemode should be 0 or 1.
    Hope someone can fix this in the new version!
    greets,
    Wouter
    Wouter.
    "LabVIEW for ARM guru and bug destroyer"

    I have another solution, the EOF works with this one.
    the cnt is the bytes that are not read yet, so the first time it tries to read (and allocate 4 MB).
    you only want to say that if it's in line mode and cnt > 256 (BUFINCR) cnt = BUFINCR
    the next time cnt is the value of the bytes that are not read yet, so the old value minus the line (until CR LF) or if cnt (256) is reached.
    with this solution the program does not try to allocate the whole file but for the max of 256.
    in CCGByteStreamFileSupprt.c row 705
     if(linemode && (cnt>BUFINCR)){
       cnt = BUFINCR;
    don't use the count input when using the vi in line mode. count does not make sense, cnt will be the total file size. also the output will be an array.
    linemode seems to be the value of the file size but I checked this and it is just 0 or 1, so this is good
    update: damn it doesn't work!
    Wouter.
    "LabVIEW for ARM guru and bug destroyer"

  • How to implement this code in labview?

    How do implement this pseudo code in labview? Please keep in mind "a" and "c" in the code below ARE VARIABLES
    for i =0 to i=maxvalue
           if i <= a 
               output = output2
           else if i > a AND i<=c
               output = output2
           else if i < c 
               output = output3
           else i = d
               output = output4
    I understance i can use a case structures and modify the label, but i do not know how to make the label dependent on a variable value. 
    Thanks 

    Try an array of boudaries and use threshold array. See this old example:
    Now just iterate over an array of values using a FOR loop.
    LabVIEW Champion . Do more with less code and in less time .

  • Can i see the macro code in labview?

    i want to know how to make the macro in labview in order to be able to modify them in labview, so i don't want to write the named of macro made in excel or word and saved there, executing it with Run Macro where i call the macro with name.xls!macro, i would like to view the basic code of the macro.
    please, don´t say me, that the solution it´s easymacro.com, there i can´t see the diagram and i am a student, i need to learn.

    Hello,
    If you want to view the macro code in LabVIEW, there is a description at www.easymacro.com that will show you...
    Just kidding...
    To my knowledge, there is no way to view the code of an existing macro in LabVIEW. I could be wrong about this, however. The best way for you to find out what functionality is available is to obtain information from Microsoft on what specific macro functionality is available through ActiveX.
    I hope this suggestion gets you pointed in the right direction. Also, I recommend that in the future you only post your question to the Developer Exchange once...there is no need to post the same question multiple times.
    Have a nice day.
    Sincerely,
    Darren N.
    NI Applications Engineer
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • LabView for ARM - MCB2300 Audio

    Hi, and thanks for reading!
      My name is Chuck and I'm an undergrad ME student taking a mechatronics course. We were asked to create a proximity alarm with the MCB2300 and an IR proximity sensor. I have the entire program running correctly, but this lab has brought up a couple questions about how to better implement audio with the LabView for ARM processors.
      I understand how interrupts work, and I've seen a couple examples online of using an interrupt with a timed loop, but I believe the current version of LabView (2010) doesn't support that feature any more. I had a couple questions about how to get a feature similar to this to work with LV 2010.
      I was thinking I could have the proximity trigger enable an interrupt that I could use to generate higher quality audio than I am already making with a While - Timer loop. However, I'm not sure how to make an increment in the interrupt VI without using some form of a loop. The solution I'm thinking of at the moment is to make a For loop run once and to have an incrementing integer separate from the loop iteration (which would only go from 0 to 1) that stores its most recent value in the shift register.
      My other question is about playing a sound file through the MCB2300. I wrote a VI that reads a .wav file and writes each sample as the output needed to drive a speaker, but that decompression turns a 10KB .wav file into a 300KB text file. I also don't have a way to really load the text file onto the board. Is there any reasonable way to go about this? I found an example online that processes audio data using the MicroVision software, but I don't want to learn a new language to implement this.
      Sorry for such a long post, I just had a couple questions and was looking for some feedback. Any help would be greatly appreciated.
    Thanks so much!

    charlestrep91 wrote:
    Hi everyone,
    I just got my Labview for ARM cortex M3 evaluation kit and I can't download a simple program to the target. I'm using the Keil ULink 2 programmer and I get this error when compiling/downloading:
    [4:23:16 PM] Status: Error
    SWD Communication Failure
    Error: Flash Download failed  -  Target DLL has been cancelled
    Detail: [UVSC_PRJ_FLASH_DOWNLOAD, MSG: 0X100A, STATUS: Ex.] (1) 
    Status: FLASH download error.
    I have read about this error and NI simply refers to Ulink2 user's guide which has this description for this error:
    Serial Wire Debug communication is corrupted. The target SWD interface is not working properly. Mainly caused by the target: debug block not powered or clocked properly. Avoid Deep-Sleep modes while debugging. Lower the Max Clock frequency in the ULINK USB-JTAG/SWD Adapter section.
    I have tried to "Lower the Max Clock frequency in the ULINK USB-JTAG/SWD Adapter section" but it didn't resolve the problem.
    I have also tried to download the program using the usb port on the dev board but instead I get this error:
    [4:51:22 PM] Status: ErrorUnexpected error occurred.
    [Source: Target is in debug mode
    Detail: [UVSC_PRJ_ADD_GROUP, MSG: 0x1002, 
    STATUS: 0xA] Code: 10]
    What am I supposed to do with that?? I'm wondering if the dev board is defective. And this was supposed to be plug and play...
    Any help is greatly appreciated!
    I'll ask the obvious question, are you intending to use SWD or just download through the JTAG.  Check your settings.  I have not used the ARM with LV, but can you download anything using the Keil software?  Give that a try.  That may tell us where the problem lies.  Try to duplicate your settings in LV from the Keil sw.
    Reese, (former CLAD, future CLD)
    Some people call me the Space Cowboy!
    Some call me the gangster of love.
    Some people call me MoReese!
    ...I'm right here baby, right here, right here, right here at home

  • Best way to implement this code in labview

    Hi
    What is the best way to implement this code in labview programming.
    I have an analogue input which triggers a boolean light when it reaches a certain voltage. but at the same time i would like it to enable two other outputs one for a set period of time and the other stay on until another statement becomes true.
    For example
    case 1:
    Set output high
    Delay(2000ms)
    Set output low
    Case 2:
    Set output high
    If statement 2 is true
    then set out put low
    if not then repeat until statement is true
    Thanks for your help

    Hi David,
    The code you posted will work, although note that the front panel becomes 'unresponsive' - as changes in the controls are only read once per iteration.  The wait function is an example of an execution timing VI, however if we want to do software timing (like a 2 hour wait) - we should use software timing VIs.
    Check out the following example (note we can stop execution during run-time):
    Regards,
    Peter D
    Attachments:
    SoftwareTiming.vi ‏26 KB

  • Can I target the STM32 Primer2 hardware with LabVIEW for ARM

    The STM32 Primer2 hardware looks very cool.  Can LabVIEW for Arm target this hardware?  From looking at the list of ARM devices supported by LabVIEW, this would appears to be a Tier 2 device (ARM Cortex-M3) with no support for TCP/IP or IO.
    Can anyone tell me the feasibility or effort required to get TCP/IP, IO, and maybe even display support for this device? 
    Message Edited by Jim Kring on 09-11-2009 10:46 AM

    Have you ever said something you wish you could take back after having time to reflect upon it?  Another forum I like, http://newsbusters.org lets the author edit his posts for a short time.  Maybe NI could to that and I would not be pulling out my foot so often.
    Well, perhaps I was a bit more "colorful" than I meant to be.  Frustration does that to me sometimes.  Still the idea of a strong rope covered with disgusting risks does get the point across magnificently.  I just wish I had saved it for something more suitable.
    Let me think back to some of the problems I've had in which I've lost hours trying to figure out...
    1.  Can't use the Wait ms function.  It halts the program.  Express wait works fine.  It was sprinkled throughout which made it hard to isolate.
    2.  Some sub VIs don't run unless they are checked as inline code.  I don't yet understand why.
    3.  At the beginning of my main vi there was a small cluster in which I filled the data from an SD card file.  I used a constant of the cluster on the input of the Bundle function, but because my program and variable sizes were near the max I changed a number of variable representations to save memory.  ...But I didn't replace the constant.  The program started exhibiting really strange behaviors.  I couldn't even get a simple state machine to run.  I was reduced to commenting out (disable structure) sections to find the problem before noticing the coercion dot on the input to the bundle (The dot against the red string color doesn't stand out very strongly which is why I missed it).  Apparently it overwrote memory since the older cluster was significantly larger than the new.
    4.  Spent a lot of time trying to get the SD card to work with SPI functions.  Even though I read that 2009 supported SD card file services I didn't intuitively understand how to wire up since the Open/Create/Replace function has a ref num output which actually connects to the file(use dialog) input of the read and write functions.
    5.  Had a problem with breakpoints and probes not working.  That apparently was caused by item #3.
    6.  Typo bug in the Arm_irq.c file  LM3Sxxxx_GPIOCAHandlerP to LM3Sxxxx_GPIOCHandlerP
    Some of these are of the rope variety. A few are actual bugs.  All probably could have been solved in moments had I a local guru.  Anyway, I've spent hours and my hands hurt.  I hope to have this little project working on the LM3s8962 today and after some hardware changes will port it over to the Primer2... Hopefully...
    This forum has been a real help... especially your quick responses.
    regards to all,
    David 

  • How we can import and run the matlab codes in labview using xmath script.

    hello,
    i have some GUI code in MATLAB and i want to process that codes in labview . tell me about the procedure how we can done this task.
    thanks in advance
    rachana
    Er. (Instrumentation)

    Hello,
    The title of your post asks about using Xmath script.  Is this what you intended?  You can use the Xmath script node in LabVIEW if you have MATRIXx 7.x or earlier installed.  However, the syntax is slightly different from the syntax of The MathWorks, Inc. MATLAB® software.
    In LabVIEW 8.0, we introduced LabVIEW MathScript.  The LabVIEW MathScript syntax is similar to the MATLAB language syntax.  In LabVIEW MathScript, you generally can execute scripts written in the MATLAB language syntax.  However, the MathScript engine executes the scripts, and the MathScript engine does not support some functions that the MATLAB software supports.  In order to reuse code that you have written, open the MathScript Window by going to Tools >> MathScript Window.  You can also use the MathScript node as part of a VI you are writing.  You can find the node on the Programming >> Structures palette.  You can import an existing script by right-clicking the node and selecting "Import..."  You can create inputs and outputs for the script by right-clicking on the node and selecting the appropriate option.  If you wish to call any functions you have written, put them in the MathScript search path.  By default, this is your "My Documents\LabVIEW Data" folder.  In LabVIEW 8.5, you can change the default search path for the main application instance by going to Tools >> Options.
    LabVIEW MathScript does not contain very many GUI functions at this time.  You can use the VI's front panel as your GUI, though, and interact with your program that way.  Let me know if you have other questions about moving your code or about specific functions.
    MATLAB® is a registered trademark of The MathWorks, Inc.
    Grant M.
    Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments

  • Troubleshooting labview for motion control

    I use labview for establishing a 1-d straight line movement for a small dc-motor, i have a PCI-7430 controller and UMI_7774, but after i wrote the code on labview, an error appear,contains the following: error 70006 occured at load velocity(the sub vi called load velocity), and then the message show the possible reasons for this as follows: an invalid axis or other resource ID
    Attachments:
    1-d motion.doc ‏87 KB

    Ni-motion in labview,
    I see that this issue is already being
    discussed in a different thread.  In the future, if you have two similar
    questions, please keep them within the same thread so that we can answer them
    in a concise manner.  Thanks.
    Best regards,
    Vu D

  • Programming Labview for pulsing from PCI-6713

    Hello anyone
    I am new to Labview and programming NI cards. I currently have a PCI-6713 card. I would like to program this card to generate pulses from 3 output channels from the card. I would like to be able to program the shape, width and time delays of the pulses. Is there an example VI code that I can use to help me with starting on this task? I cannot seem to find any example VIs in the Labview 7.1 software I have on the computer for this purpose.
    Hope to hear from you soon.

    Hi magnushsu,
    I wasn't able to find any examples specific to generating an arbitrary waveform, but I did find one that reads waveform data from a file. This example uses a function generator to create the file, and then reads the data from the text file to generate the waveform. You will have to modify the text file point-by-point to create an arbitrary waveform. The example can be found in the NI Example Finder by selecting "Examples" from the pulldown menu next to "Open" on the splash screen. Search for "Hardware Input and Output >> DAQmx >> Analog Generation >> Voltage >> Gen Mult Volt Updates-Text File Source.vi
    I hope this info helps,
    Michael Chaney
    Systems Engineer - TestStand
    National Instruments

  • LabVIEW for Android OS

    Hi,
    Can we install our LabVIEW applications on Android OS. If there is any provision I would welcome the options available.
    If not then any alternatives for it ?
    Regards,
    Runjhun.

    LabVIEW code is compiled for the target CPU and OS it was created for (usually the same as the CPU and OS the LabVIEW development system is running on which was used to create the code). Since LabVIEW itself does not run on Android nor any non-x86 CPU currently, it's built executables nor libraries can be targetted for the Android OS nor the ARM CPU Android is usually running on. Even if you happen to run Android on an x86 device it won't work, since the compiled code needs to match both the target CPU and OS.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Can i run visual c++ code under labview?

    I have two instruments, one is controlled by labview and the other one is controlled by visual c++ code. is there any ways so i can run the c++ code in the labview environment. in other words, can i control the instrument which is only controllable by c++ code, with labview? does labview recognize .cpp files or .exe which is the compiled form of my c++ file ?
    thanks

    Check http://www.ni.com/devzone/idnet/library/instrument_driver_guidelines.htm. Another quick and dirty way to add instrument control is to use the Instrument I/O Assistant. This is not nearly as flexible as a full driver but might be enough for you. Before attempting either, you should get familiar with the instrument's remote control commands by using the interactive control feature in MAX (right click on instrument and select "Communicate with Instrument").

Maybe you are looking for