Help with automating my LEGO MINDSTORM.

Hey everyone.
I was given a task to automate my robot in order to perform the tasks required but I'm seem to get stuck every time I'm trying to run this program and I need someone's help to diagonise this problem.
Thank you guys  
Attachments:
Task 1.vi ‏23 KB

Hi FarisM,
Thank you for your post. What is currently happening when you run the code?
As the VI stands currently, once the Enter Button has been pressed on the NXT, the rest of the VI will run once. This is because although there is a case structure with multiple cases, once a single case has run, the VI will not executre the functions until the VI is run again. Are you seeing behaviour where once the enter button is pressed the VI starts then seems to do one movement and then stops? You will need to implement a while loop around the rest of your code with some timing so that your algorithm runs continously.
I have also linked in an introduction to labVIEW, these guides can be quite useful to use as reference: http://www.ni.com/gettingstarted/labviewbasics/
Best Regards,
Ben B.
Applications Engineer
National Instruments UK & Ireland
"I've looked into the reset button, the science is impossible!"

Similar Messages

  • Help with Automator

    Hello all I am new to the apply community Im playing with automator in mountain lion I have figured out how to do some basic tasks but now I have run into a snag which I can't seem to find an awser for... I remember in the dos days for microsoft you could create batch files to rename a whole directory but there where certain things you could do like   *.* to make it list everything etc... I want to rename files in my DLNA server DIRECTORY
    so if my file name is
    Criminal Minds 2.04 Psychodrama.avi
    Criminal Minds 2.05 Aftermath.avi
    I want automator to change it to
    S02E04 - Psychodrama.avi
    S02E05 - Aftermath.avi
    I can get automator to delete the Criminal Minds etc. but I can't figure out how to get it to remember the numbers etc and change it to the new file
    if anyone can help and maybe send me somewhere where I can get all the info on automator or maybe a script file would be a better soloution to begin with this but I don't know how to script either
    thanks
    Mike Dennison

    If you have gone with A Better Finder Renamer, then that's cool.
    I have rewritten and more thoroughly tested my Python script in Automator. If you use it as an Automator application on your Desktop, it will allow drag and drop folders or single files. It will now detect the folder and walk down through any sub-folders to ferret out your .avi files and (if they match the original filenaming format) rename the files in their present location, to your originally specified output format.
    Note: The script will rename your original files to the specified new naming convention.
    The last thing the script does is write a text logfile of processed files to your desktop. You can double-click this logfile and the OS X Console application will open and display it for you.
    Open Automator.
    Choose Application
    Select Library > Run shell script
    Drag this item to your right into the larger workflow window and release.
    Choose Python from the selection list of script tools.
    Choose Pass input: as arguments.
    Remove all content from this window.
    Copy the entire Python source from below, and paste into the open Automator window.
    Click File > Save...
    Select your Desktop as the save destination
    Name the Automator application moviefix (arbitrary)
    The automator application on your desktop is now enabled for drag and drop folders and files.
    #!/usr/bin/env python
    This program will convert files from one format to another.
    From: Criminal Minds 2.01 The Fisher King (Part 2).avi
    To:   S02E01 - The Fisher King (Part 2).avi
    Author: VikingOSX, Apple Support Community, 10/2013.
    import sys
    import os
    import re
    import time
    #test = "Criminal Minds 2.01 The Fisher King (Part 2).avi"
    LOGFILE = 'file-list.log'
    DESKTOP = "~/Desktop"
    # You can add to this list as comma-separated, single-quoted values.
    valid_extension = ( '.avi' )
    rename_list = []
    def log_files(filelist):
        Write processed files to logfile with time stamp.
        cwdlog = os.path.join(os.path.expanduser(DESKTOP), LOGFILE)
        with open(cwdlog, 'a+') as log:
            # if new logfile, place header text in it
            if os.stat(log.name).st_size == 0:
                log.write("Processed Files\n")
                log.flush()
            for item in filelist:
                log.write(logstamp(item))
    def logstamp(thefile):
        yyyy-mm-dd hh:mm:ss full path to filename.
        stamp = time.strftime('%Y-%m-%d %X ') + thefile + '\n'
        return stamp
    def rename_file(path, thefile):
        Renames files in their current directory location.
        m = re.match(u'(\D*)(\d)\.(\d{2})(\s+\D*\S*)', thefile)
        if m:
            #show = m.group(1)
            season = m.group(2)
            episode = m.group(3)
            title = m.group(4).lstrip()
            newfile = "S" + season.zfill(2) + "E" + episode + " - " + title
            rename_list.append(thefile)
            os.rename(thefile, os.path.join(path, newfile))
        return
    def main():
        for f in sys.argv[1:]:
            # recursively process folders or n-tuple dropped files
            if os.path.isdir(f):
                for root, dirs, files in os.walk(os.path.abspath(f)):
                    for each in files:
                        if each.endswith(valid_extension):
                            rename_file(root, os.path.join(root, each))
            else:
                frp = os.path.realpath(f)
                rename_file(frp)
        if len(rename_list):
            log_files(rename_list)
    sys.exit(main())

  • Help with automating "System Update"

    edit:
    please help - who do I contact in Lenovo / IBM to get real help with this ?
    this is a corporate project and I need to resolve this as soon as possible.
    does anyone from Lenovo actually read this forum?
    I've opend a support call in Lenovo's helpdesk (via email) but no reply except an automated one for... like a week.
    help! help! help! we don't mind paying for it, we NEED to resolve this.
    any help at all would be greatly appretiacted. please point me at the right direction?
    sorry for this venting but really, I just need to get a move on this already... :-0
    can anyone at all help ?
    any idea where I can find more information / expert assistance ?
    thanks for any help...
    -Shay
    Hi,
    I've been able to fully automate System Update distribution using Group Policy. this works perfectly.
    I am now trying to achive the same functionality using scritps.
    the problem: I get quite a few prompts for "License Agreement" - not the "master" initial one, only a few for the different installs.
    here's my setup:
    1. a local server is the repository.
    2. I import a .reg file before installing "System Update" using an automated install.
    3. after a restart, a command runs on the local machine.
    here are the details:
    registry settings:
    [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Lenovo\System Update]
    "LanguageOverride"="EN"
    [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Lenovo\System Update\UserSettings\General]
    "IgnoreLocalLicense"="YES"
    "DisplayLicenseNotice"="NO"
    "DisplayLicenseNoticeSU"="NO"
    "ExtrasTab"="NO"
    "RepositoryLocation1"="***my internal server here ****"
    "RepositoryLocation2"=""
    "RepositoryLocation3"=""
    "NotifyInterval"="36000"
    [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Lenovo\System Update\UserSettings\Scheduler]
    "SchedulerAbility"="YES"
    "SchedulerLock"="LOCK"
    [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Lenovo\MND\TVSUAPPLICATION]
    *** network drive mapping here, this part works ***
    also, I use this command to run the updates:
    call "C:\Program Files\Lenovo\System Update\tvsu.exe" /CM -search A -action INSTALL -IncludeRebootPackages 1,3,4 -noicon
    I am just about desperate... I would REALLY REALLY appreciate any help, hint etc :-)
    Thanks for ...even trying... lol
    regards,
    Shay
    Message Edited by catman2u on 03-18-2008 05:04 AM
    Message Edited by catman2u on 03-25-2008 02:41 AM

    catman2u wrote:
    does anyone from Lenovo actually read this forum?
    From the Communiy Rules in the Welcome section....
     Objectives of Lenovo Discussion Forums
    These communities have been created to provide a high quality atmosphere in which users of Lenovo products and services may share experiences and expertise. While members from Lenovo may participate at intervals to engage in the discussions and offer advice and suggestions, this forum is not designed as a dedicated and staffed support channel. This is an informal and public forum, and Lenovo does not guarantee the accuracy of information and advice posted here -- see important Warranty information below.
    No amount of ranting is going to get you anything more than you will achieve with a clear exposition of your issue... so you might want to try doing that instead of ranting and assuming that everyone already knows what you know etc etc.
    Cheers,
    Bill
    I don't work for Lenovo

  • Help with Automator workflow!

    I work in graphics at a newspaper. I schedule items for publication with iCal. I want to set up an action that will move documents from one folder to another when the event they are associated with in iCal is passed.
    For example. I have a calender called legals. I schedule the legals to run on a certain date, repeat them as required and then attach the document to the event so it is right there handy when I get ready to publish them. I have a folder called "legals" where all of these files are kept. I find this a wonderful system. What I want for Automator to do is to move the files to a folder called "old legals" when the event has passed in iCal. I am not very familiar with Automator but have been trying to do this for a while and can't figure it out. Any help in this would be greatly appreciated.
    ~Chris

    If you can identify which files need to be moved on what days, you can still do it. Somehow, you have to name them, or organize them so that the computer can identify which ones need to move.
    There is no "mind-reader" action to figure out which files you're thinking about.
    Once you've established a method by which you can identify the particular files, instead of 1) and 2), use Find Finder Items, search in the legals folder, and set the criteria by which you can find the appropriate items.
    Make a different workflow for each particular set of items.

  • Help with Automator - create workflow to move files to dated folders

    If anyone could help me, I'd greatly appreciate it.
    I have no idea how to use Automator, but I think it'd be perfect for this job.
    I want to take a folder of files (images) and move them to separate folders which are named for the dates that the files were created on. So, for instance, I have a folder of ten images. Five were created on November 1st and the other five were created on November 2nd. I want to create two folders on the desktop with the dates in the name (like 20071101 & 20071102) and take the five images from 11/1 and move them to the 20071101 folder and the five images from 11/2 and move them to the 20071102 folder (sorry for the run-on sentence).
    Is this possible with Automator? Is this an easy thing to do?
    Thanks,
    Antonio

    I'm trying to do something very similar. I need to open an image sequence in QuickTime and export them to a mov file. Easy enough, but I would also like to create a new Finder folder and name it with today's date and save the mov file to that new folder.
    What frustrates me is that it doesn't appear you can name Finder folders in any way other than using the Rename Folder action. I was hoping to use today's date that I had copied to the clipboard. Also, I have no experience using AppleScript, so hoping to avoid anything advanced there.

  • Blutooth connection with the robot Lego Mindstorms NXT

    Hi,
    I have got a license for Bluetooth Stack for Windows by Toshiba.
    I try to connect to the Lego robot, Mindstorms NXT : http://mindstorms.lego.com/en-us/default.aspx
    But it does not work.
    The connection seems to be good and both NXT and PC find each other, but when I try to communicate, the NXT says "line is busy".
    Does somebody can tell me if he can get through this issue ?
    Does Toshiba and Lego have a deal about connecting issues ?
    Thank you.

    Hello
    Do you have Toshiba notebook or you just use Toshiba BT stack?
    How to get through this issue? Should someone of us spent 250 Euros to buy this and test it at home? Dear oracid this is user-to-user forum and you can get some help from someone who has identical hardware at home and can help you with his experience.
    Deal between Toshiba and Lego in my opinion there is no deal. Every manufacturer who build hardware and want to use BT must know how this works. On the hardware market there are specific specifications for each communication technology and what Toshiba do is to build and offer specified hardware.
    In your case you should contact Lego support and ask for help. they have, probably, tested own stuff with different hardware platforms, operating systems and BT software so Lego should have enough experience with own products.

  • Help with Automator Script for QuickTime Pro Movie Conversion from Vado

    All my videos from my Creative Vado do not show up in iMovie 09 initially on import. By trial and error, I have discovered that the old version of QuickTime Pro 7 ($29.95) will convert them to .mov files that can be seen by iMovie 09 once the converted videos are imported back into iPhoto.
    I am (very) new to mac things, and it looks like in theory I could use Automator to handle to conversion process, and perhaps even the re-import into iPhoto. Does anyone have any suggestions on how to go about this? Where would be a good site to post this as a project that I could pay some one to help me, provide an automator script/workflow?
    Are any other solutions available? Buy Final Cut etc?
    PS (Rant): One of the reasons I bought a MacBook Pro and iLife was to take advantage of what I thought was supposed to be Apple's superior multimedia handling. It seems ludicrous to me that with a MacBook Pro running the latest software (10.6.4), and using the latest versions of iLife, I'd have to buy an old version of QuickTime to convert my videos so that I could manipulate them in iMovie. Sigh.

    MPeg Stram clip will export files which are compatible with iMovie '09. It (iMovie )can import the following.
    DV
    AIC
    Motion-JPEG
    Photo-JPEG
    MPEG-4 (Supported profiles)
    H.264 (Supported profiles)
    Apple Animation (Movie '09 only)
    Apple Video (iMovie '09 only)
    iMovie '08/'09 will not accept files containing extraneous data tracks such as:
    'Tween
    Text
    Chapter
    Closed Caption
    Secondary audio such as AC3
    etc.
    iMovie '08/'09 Will not accept files that rely on proprietary/third-party components such as
    DivX
    WMV
    XviD
    etc.

  • Help with Automating Contact Editing Please!

    Hey Apple Community!
    I'm having some trouble organizing my contacts and sorting info fields.
    Basically I have a few hundred contacts, and certain fields of the information should be in others.
    Here's some of the things I want to change.
    First and foremost, after I imported Facebook information (either from OS X Facebook integration or iOS') it put most of the contact information in the Notes field.
    Most of the notes are structured like this:
    Note
    "Quote from Facebook blah blah" -if it exists
    Location: City, State
    Facebook: profile.name
    Website:
    Hometown: City, State
    However, the actual Facebook field is blank!
    How can I go about fixing this? I would like an automated option such as AppleScript or an Automator Workflow if possible since I have a lot of contacts.
    Second, after importing LinkedIn information into my contacts, those who are updated have their "Home Page" set as linkedin://#profile/xxxxxxxxx.
    I would like these moved into a field called "LinkedIn" since that way selecting them will automatically open up the LinkedIn app on iOS or a webpage on the desktop.
    I have attemped at making an AppleScript for this, and it runs without errors but doesn't fix the problem.
    Here's what I have:
    tell application "Contacts"
              repeat with thisPerson in every person
                        if thisPerson's home page exists then
                                       set linked to thisPerson's nickname
                       set thisPerson's LinkedIn to linked
                             end if
              end repeat
    end tell
    And there are a multitude of other problems, but these are the biggest.
    Sorry for the long post, but I would be greatful for any help, thanks!
    Regards,
    Tyler

    Third party app did the trick although I figured something like this would be integrated into iOS by now, admin can delete this thread if you want.

  • Help with Automator (iCal)

    I have created an Automator script that prints our an image on two computers to keep the nozzles from drying out.
    I want it to do this every morning at 3am.
    Setting up an event in iCal is proving to be a challenge. 
    The settings I have made in the event are:
    from: 12/15/2013  02:00 AM
    to:  12/15/2013  03:00 am  (I didn't really know what to do here so gave it an hour to work)
    repeat: Every Day
    end: On Date 12/13/2015
    alert:
    Open File
    Name of File
    15 minutes before
    alert: None
    attachments: I attached the file
    What the calendar does is to run a blue line from the event out to infinity and add event after event until every window of every day off into the future is filled up with this event repeating itself.
    Please help.
    Thanks,
    --Kenoli

    I solved the problem.  It was a problem related to setting the end date.
    Thanks,
    --Kenoli

  • Help with automator and folder actions please

    Hi all!
    I'd like to attach a folder action to a folder, so that any time i drag something in it, it'll be sent to my mobile phone.
    I just dont get it how to do it.
    Can please someone help? I'm totaly incapable of writing an applescript to do so...
    Best regards,

    Hi!
    So next step...
    I create a folder so and right-click "configure actions" (sorry my
    system is french so the terms are probably different on the US
    system....)
    Automator launches, and I add the push to BT part to my workflow. I save
    it all, and return to the finder.
    I right click on the folder, the script appears as it should.
    I click on the created script, a window opens with the device selection.
    I click OK. and get a message saying that this kind of file (a standard
    .sis file) won't be accpted from my device (a 6680 nokia). I click "try
    anyway", the window of file transfer opens, but I get the error
    "Transfer failed, operation not handled".
    I don't get it. Where did I go wrong?
    Thanx fo your feedback!

  • Needed help with Automator - System Prefs

    Hi,
    I'm hoping to make an automator workflow that changes some system preferences that I have to change frequently in switching between a work computer and media center.
    When it's used as a media center it's setup with a lower resolution to match the TV and the energy settings and screensaver are set to never be used when in media center mode.
    Is there a way to use automator or even apple script to change the resolution, energy, and screensaver settings back to my normal settings?
    I tried using the record option in Automator but it doesn't seem to recognize anything specific at all.
    Could someone please help me set this up?

    See http://discussions.apple.com/thread.jspa?threadID=2039384 and Introduction to Automator tutorial at http://automator.us/leopard/video/index.html

  • Can anyone help with Automator/Scripts with Mail Items

    I have a set up a smart folder in mail and it shows about 100 emails. These vary in content, addresses and recipients. The emails also have an extended threads.
    I need to generate a report with the emails (including threads) by subject time, date. etc.
    It will need to analyse the From: To: Date: Time: Subject: for each of the top email and also (all the threads within each email).
    How could Automator be scripted to do such a task. Manually it will be very time consuming and difficult.
    1. I am a newbee to automator and scripting is this likely to be beyond me?
    2. Are there any good sources of scripts available on the web which could be adapted?
    3. What is the recommended reading for writing, applying and using Scripting?
    iMac G5 Mac OS X (10.4.6) Airport Extreme; PalmT5
    iMac G5   Mac OS X (10.4.6)   Airport Extreme; PalmT5

    Thank you for taking the time to reply. I was finally able to figue out what to do. So far today everything is fine.
    Most Sincerely,
    Glenda

  • I need help with automator work flows

    im having troube adding songs to my itunes with autmator i ke getting error mesaage 1752 ...anyine know how i can resolve this issue ?

    viguy_ wrote:
    i was told the error means that the process is taking too long to finish so it just times out
    That would have been handy to know, earlier.
    I have know idea if this will work, but you might try editing the timeout of the action.
    If you right-click on the Action, you can choose "show in Finder"
    Make a copy of the action in your home somewhere. Right-click on that copy and select Show package contents.
    Go into the contents folder and open the info.plist file with a text editor like TextWrangler. Change the timeout value to something greater than the default of 3600 seconds. Is it really taking longer than an hour? If it is not, then I doubt this will work.
    Save the file, and then Import it into Automator (File menu).

  • Need help with automating text import/pasting/macro between Photoshop and Excel

    Hey everyone,
    I'm working on a large project now that seems extremely daunting, but I was hoping there would be some way to automate it using either Actions or some sort of macro program.  Here's the gist:
    I've created a template with 24 differently sized text boxes in the photoshop image file.  Each text feild has unique text that needs to be be pasted into it, which has been compiled in excel.  This wouldn't be too dificult to do, except I have to recreate this image and all 24 text fields aproximately 350 times.  None of the text boxes will remain static through all 350 images as text is the title, description, and demographic ratings/percentages/data for the topic of each image.  I did something similar manually last year and it took me about 3, non-stop 18 hour days to complete it.
    (the test template)
    Can anyone think of any way I could automate this process?  I'm thinking some sort of macro that copies cell 1 in excel, switches to photoshop, opens layer 1, pastes, switches back to excel, goes to cell 2, copies, back to photoshop, layer 2, pastes, etc, etc, then does a 'save as' in photoshop and revets to PS layer 1, EX cell 1 (on tab 2) to start the process all over again.  I have no idea if this would work or if there is another way to do this but I would really appreciate any help or advice you guys could give.  I don't have really any expreience using PS Actions or macro programs/scripts, so I may be over my head or overlooking a really simple way to do this.  If there's a way to do it, I'm persistent enough to figure it out and get it working. Doesn't really matter how it gets done, I just need to fill those text boxes as best as I can and as quickly as I can.
    Any help you all could give is really appreciated.

    Have you read up on the Variables support in Photoshop?

  • Can you help with automator & disk utility?

    I'm trying to set up an automated "permissions repair" to run every night. I set up a workflow using automator and saved it as an iCal item. If I double-click on the resulting .app, or run from Automator, the workflow works as I expected, but all I find in the morning is an open Disk Utility with no repair performed & no error messages. Examining the log file confirms that nothing happened except the launch.
    Here's what the wf does: Launch Application-Disk Utility, Watch Me Do-Click in the text "Macintosh HD" Click the "Repair DIsk Permissions" button, Pause-for 10 seconds, Play QuicKeys Shortcut-(types admin username, tab, admin password, enter).
    Like I said, works just fine except when iCal runs it. What am I doing wrong?

    ..."I'm trying to set up an automated "permissions repair" to run every night."...
    As others have mentioned, it shouldn't be necessary to "repair permissions" every night.
    And if you are an administrator in charge computers used in a shared environment (eg. schools, libraries, a shared machine in a work place, etc.), I would go further and say that "repair permissions" should definitely not be run at all without verifying them first to make sure everything checks out, and certainly should not be automated unless some sort of verification routine is included.
    With Leopard's version of "repair permissions", failure to exercise sufficient caution could allow even "standard" users to gain "root" level privileges.

Maybe you are looking for