How to automate Thorlabs TDC001 motor

Hi.  I am trying to automate the control of a Thorlabs motor, this question has been asked before but I don't think there has been a satisfactory answer.  I have the motor connected to a rotation stage and I would like to be able to tell the stage to rotate by x degrees every x seconds.  I have followed the instructions provided by Thorlabs on how to get started so I can control the motor via the buttons on the GUI (files attached).  I have looked at the help files provided by Thorlabs but they were not much help to me (I am a fairly new to Labview).  I have tried tried to use the "setcycleparams" and "getOperatingMode" Active X methods but with no success.  Has anyone implemented something similar?  Any help would be greatly appreciated.  Thanks.
Attachments:
Rotation_servo_control_automated.vi ‏16 KB

I like to use a little timing vi to see if the time has elapsed for a certain event. If the output is true, you can make a case structure so that it sends a command to your stages and restarts the timer.
The timer uses an uninitialized shift register, so make sure to call it once using the "start" mode before checking how much time has elapsed. You can call it many times from anywhere in your program, and wire the error lines to make sure it executes in the order you want.
Attachments:
FG_Timer.vi ‏25 KB

Similar Messages

  • Vi control of Thorlabs TDC001 motor control,need to generate a ref # for ActiveX

    I am trying to create a custom program for control of a Thorlabs TDC001 motor controller.   The stand alone Thorlabs software works,  I also created a Active X window using the Thorlabs software in Labview.  I would like to create an automated look with specific directions for the motor.   I think my problem is not being able to generate a valid device reference ID at the start of the process to pass to each of the subroutines.  Is there a subVI for this?

    Hey LIBS,
    Unfortunately, I am not familiar with the Thorlabs motor controller or its software's ActiveX interface. When you created the ActiveX window in LabVIEW, were you able to control your motor? Since the control of you motor is all done through ActiveX, the only way to get a device reference would be through the ActiveX interface. You will want to check the properties and methods associated with your Thorlabs ActiveX control to see if there is such a device reference available.
    Hope this helps.
    -Ben
    WaterlooLabs

  • Scanning mirror using Thorlabs TDC001 apt-dc servo controller

    Hello. I need help with configuring a Labview code controlling a Thorlabs TDC001 apt-dc servo controller. I just need direction on which commands to use to input the parameters of the distance and repetition rate of the stage that the controller is linked to. Attached are two separate codes that myself and a colleague created for the stage. If someome can look at this and offer some helpful tips, that would be appreciated. I am now learning how to use Labview correctly.
    Attachments:
    example.vi ‏11 KB
    attachments.zip ‏24 KB

    Hi opticsdude,
    I would recommend taking a look at motion examples in the NI Example Finder (you can find this by going to Help>Find Examples in LV).
    You can also take a look at the NI Motion Help here. There is also a good article on motion control in general here with lots of related links that you might find useful.

  • ThorLabs stepper motors synchroniz​ation question

    I want to synchronize the movement of two ThorLabs stepper motors which use ActiveX controllers. How can I make sure that the "move absolute" of both motors execute at the exact same time? I have tried putting them in different sequence structures and synchronizing them using 'rendezvous' but, even if the dataflow arrives at the same time to both, one executes first than the other.

    Hello,
    There is no way for you to achieve synchronization at a software level with your motors. One will always execute first once everything is compiled. You need to be looking into ways for hardware synchronization for these.
    -Zach
    Certified LabVIEW Developer

  • OB52 Posting Period Close:  Does anyone know how to automate the close?

    Does anyone know how to automate the FI Period Close (trans code OB52)?  Currently, the business users go into the screen and open and close any periods manually.  For the MM period close, we are able to do so because we found the program to use in the batch job.  For some reason, the FI side shows the program SAPL0F00 but this is only a view and will not allow a batch job to be created.  Does anyone know of the actual program used for the FI period close?

    Use program RFPERIOD_OPEN.  It may help.  For further details you may check the following thread.
    RFPERIOD_OPEN

  • How to Automatically generate .XSL file of XML file ???

    Hello Everyone,
    I have UI which provide the facility to create own format by using drag and drop utility. I have also xml file which contains the data. Now task is how to automatically generate the .xsl file of the dynamically designed format for the data stored in xml form.
    If you have any idea about the solution of the above problem.
    I will thankful for any help regarding this…
    Thanks
    B. Kumar

    XSL stands for EXtensible Stylesheet Language, and is a style sheet language for XML documents. .xsl is the extension of the XSL file.Thank you, I am aware of all that.
    When we design any format by using drag & drop utility, System has to generate the .xsl file (extensible stylesheet for the xml document).Why? To accomplish what?
    And then .xsl file is used to display the data which is stored in xml document on the webpage with designed format.So you need to define the mapping between XML and HTML? and you're hoping to do that automatically?
    That's a job for a user interface designer. Not a tool.
    In brief we need to write a parson
    Parser
    which will take any designed format and generate the .xsl file for that design, to display the data which is stored in XML document.Doesn't make sense. It would make more sense if you started from a schema. Starting from an actual XML document, i.e. an instance of the schema, no, not even slightly.

  • How to automatically detect server ip address

    does any one know how to automatically detect an ip address of a server from the client with a socket based connection ?
    instead of prompting the client to connect to the server ip address which is trouble some.

    You must start with some initial information and a known environment.
    There are several possibilities after that.
    - The server has a 'name'. This is not an ip address but a name like "yahoo.com". When you connect using that, even if the IP changes, the correct IP will be returned. (At least ignoring an annoying bug in some VMs)
    - A specific IP address
    - Use a methodoly to 'request' a server address. One version of this is to use a UDP broadcast another version uses a service manager (which itself must be found.)

  • How to automate the flatten transparency in illustrator?

    How to automate the "Flatten Transparency option" in illustrator via javascript. Please share with me.
    Thanks

    I'm looking for the same thing.
    app.executeMenuCommand('Flatten Transparency'); works in CC but all it does is it brings up the window and you still have to click OK to make the script continue.
    Before anyone asks why do  you want to do it etc. In print thereare instances where you have to open and edit (not text) large numbers of pdfs to change colours, outline fonts etc otherwise there's trouble on print devices.
    My script for instance looks for 100K blacks and replaces them with rich black, looks for empty text frames, overprint, bleed settings, clipping paths etc.
    The only way to edit successfully a pdf without fonts is to place it and flatten transparency outlining fonts and then work on it.
    So back to the point. After the window pops up, is there a way to simulate a keystroke like "Enter" or maybe app.executeMenuCommand('Flatten Transparency'); takes arguments like:
    app.executeMenuCommand('Flatten Transparency',preset_name);...?
    Anyone? Adobe SDK team? :-)

  • How to automate a redundant task on PC to "Include Prefix when Numbering Pages"

    I work in book publishing and we're generating indices using the book feature. The big problem is that for the print version we need the folios styled a certain way "without a prefix" but to create our index in the book feature, the prefix needs to be turned on.
    Is there any way to do any kind of drag and drop so I don't have to open every chapter of the file to turn the prefix on? Though it doesn't take long, it's repetitive and has to be done every time we update our books. (The "Section Prefix" information is alreay inserted, it's just a matter of toggling it on or off depending on what doing in the InD file.)
    I do not write scripts. It seems like a simple task but would take me months to figure out. If you can send me to someone who can figure out how to automate this task, I would greatly appreciate your help.
    Macgrunt was able to help me but then I realized I was on a PC. Is this something that can be done in Javascript?

    Here's a version that batch-processes the selected folder with InDesign documents as you asked in PM.
    Main();
    function Main() {
        var inddFile, doc,
        inddFolder = Folder.selectDialog("Choose a folder with InDesign documents.");
        if (inddFolder == null) exit();
        var inddFiles = inddFolder.getFiles("*.indd");
        if (inddFiles.length == 0) ErrorExit("Found no InDesign documents in the selected folder.", true);
        for (var i = 0; i < inddFiles.length; i++) {
            inddFile = inddFiles[i];
            app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;
            doc = app.open(inddFile);
            app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;   
            sections = doc.sections;
            for (var j = 0; j < sections.length; j++) {
                sections[j].includeSectionPrefix = true;
            doc.close(SaveOptions.YES);
    function ErrorExit(error, icon) {
        alert(error, scriptName, icon);
        exit();
    You can also use this script to run a script or a set of scripts on a bunch of files. (Warning! It's not totally tested)

  • How to automate the queries

    hii everyone
    I want to automate queries.i.e they should be executed automatically on a particular day in the week. can we do it through oracle jobs..actually wht the case is i will be executing 5 queries evey tuesday.the output frm these queries are used to process another job tht runs every tuesday evening.rather than executing all these queries everytime i want to automate these queries.
    can anyone help me how to automate this job.
    thnakx

    hii justin
    thnkx for the reply..
    the queries wht im executing are little bit complex.one query is dependent on the other..im sending u the steps wht i will be doing when the queries are executed
    Below mentioned are the steps to be followed to check if the rewards job ran successfully or not –
    1.     Run the QUERY #1 in Rewards_Queries_Weekly_Test.sql
    2.     Note down the number of records returned in STEP 1.
    3.     Run the QUERY #2 in Rewards_Queries_Weekly_Test.sql.
    Enter current date as INPUT parameter.
    4.     Note down the number of records returned in STEP 3.
    5.     Compare the number of records returned in STEP 1 and
    number of records returned in STEP 3. BOTH THE NUMBERS
    SHOULD MATCH TO PROCEED TO NEXT STEP.
    6.     Copy the results of QUERY #1 to an excel sheet. Do not copy
    the serial number generated by PL/SQL Developer.
    Copy only the fields returned.
    7.     Copy the results of QUERY #2 to an excel sheet.
    Do not copy the serial number generated by PL/SQL Developer.
    Copy only the fields returned.
    8.     Assuming that the results of QUERY #1 were copied to the
    columns A1 & B1 and the results of QUERY #2 were copied to
    the columns D1 & E1, copy the following formula
    to F2 =IF((A2=D2)*(B2=E2),0,1)
    9.     The output of STEP 8 would be either 0 or 1 in the cell F2.
    1 indicates the records with mismatch and 0 indicates the correct
    records which can be ignored. It is possible that the records with
    mismatch have an entry in job special pay table and these records
    also can be ignored. These records can be filtered
    by following next steps.
    10.     Copy the data in the cells D1,E1 and F1 to H1, I1 and J1 respectively.
    While pasting use the option paste Special and select Values option
    in the dialog box.
    11.     Sort H1, I1 and J1 data by J1 descending and next by H1 ascending.
    This would list all the in correct records first and correct records next
    so that they can be ignored.
    12.     Now run the QUERY #3 and copy the results to K1. Do not copy the serial number generated by PL/SQL Developer. Copy only the fields returned. These records indicate the rewards special pay records given in the last one week.
    NOTE: The QUERY #3 expects two dates in the IN clause. These dates should be Current Date (Since the reward jobs run on Tuesday it will be always current Tuesday’s date) and Last Tuesday’s date.
    13.     Select all the incorrect records in the cells H1, I1 and J1 and apply
    the following conditional formatting formula with format as RED color.
    = VLOOKUP($H2,$K$2:$K$220,1,FALSE) <> " "
    NOTE: In the above formula change the value of K$220 based on the number of rows you get in the cell K from the results of QUERY #3.
    14.     The records with BLACK color are the actual records with some issue. Investigate each record manually and analyze the issue. Keep negative hours adjustment, 26 weeks rule in mind while doing so.
    the above are 14 steps i will be doing every tuesday when im executing the queries
    i want to automate the whole process wht im doing in the 14 steps..
    could u suggest me something on this
    srikanth

  • How to automate the deletion of existing request

    Hi ,
    I want to delete the existing old requests under Cube . How to automate this process .
    Please can anybody help me .

    Hi,
    This code deletes <b>all</b> requests seuential from one particular cube determined by parameter I_Cube. Please create a variant with name of desired cube
    and a batch job processing this variant.
    REPORT  Z_DELETE_REQ_FROM_IC.
    DATA: I_T_RSICCONT TYPE TABLE OF RSICCONT.
    DATA: WA_RSICCONT  TYPE RSICCONT.
    PARAMETERS : I_CUBE TYPE RSINFOCUBE .
    IF I_CUBE IS INITIAL.
      EXIT.
    ENDIF.
    SELECT * FROM RSICCONT INTO TABLE I_T_RSICCONT WHERE
             ICUBE = I_CUBE.
    LOOP AT I_T_RSICCONT INTO WA_RSICCONT.
      CALL FUNCTION 'RSSM_DELETE_REQUEST'
        EXPORTING
          REQUEST                    = WA_RSICCONT-RNR
          INFOCUBE                   = WA_RSICCONT-ICUBE
        EXCEPTIONS
          REQUEST_NOT_IN_CUBE        = 1
          INFOCUBE_NOT_FOUND         = 2
          REQUEST_ALREADY_AGGREGATED = 3
          REQUEST_ALREADY_COMDENSED  = 4
          OTHERS                     = 5.
      IF SY-SUBRC <> 0.
    open for error-handling
      ENDIF.
    ENDLOOP.
    Please use it carefully 
    Regards
    Joe

  • How to automate the payment program proposal creation

    Hi Experts,
    Another question, as we have to automate the creation of the payment run and its proposal run and then the list should go to specified person, who will check and then the payment run will be executed manually in the system.
    How to automate this?
    Thanks,
    Atif

    Hi,
    For payment run parameter generation you can use the program SAPF110S and for the proposal run execution you can use the program SAPFPAYM_SCHEDULE.
    Schedule these programs via a batch job on periodic basis in steps and give the intended recipients in the spool recipients.
    Regards,
    Gaurav

  • How to automate the data load process using data load file & task Scheduler

    Hi,
    I am doing Automated Process to load the data in Hyperion Planning application with the help of data_Load.bat file & Task Scheduler.
    I have created Data_Load.bat file but rest of the process i am unable complete.
    So could you help me , how to automate the data load process using Data_load.bat file & task Scheduler or what are the rest of the file is require to achieve this.
    Thanks

    To follow up on your question are you using the maxl scripts for the dataload?
    If so I have seen and issue within the batch (ex: load_data.bat) that if you do not have the full maxl script path with a batch when running it through event task scheduler the task will work but the log and/ or error file will not be created. Meaning the batch claims it ran from the task scheduler although it didn't do what you needed it to.
    If you are using maxl use this as the batch
    "essmsh C:\data\DataLoad.mxl" Or you can also use the full path for the maxl either way works. The only reason I would think that the maxl may then not work is if you do not have the batch updated to call on all the maxl PATH changes or if you need to update your environment variables to correct the essmsh command to work in a command prompt.

  • How to automate the exchange rates in BI

    Hi Guys
    can any one let me know the step by step approach of how to automate the exchange rates in BI...I know that if we right click in source system and say transfer exchange rates ..we will get those values ....But I want to automate this process in BI with a Process chain...I have created a start variant and connected it to a ABAP process type and calling the RSIMPCURR programm in sync..local....Do I need to call any Program event ? Iam not able automate this..please advice step by stepp
    After ABAP process type do I need to create any other steps ?
    regards

    Hi,
    All you have to do is to define the ABAP Process as new process variant, call mode syncronous, called from local, program name RSIMPCURR, and define a program variant for example number 12 and create it, there you select the update exchange rates., go to attributes, give a meaning and save all. You can automate the start of the porocess chain and select it as period job.
    Regards
    MK

  • How to automate the Acrobat Reader plugin in Internet Explorer

    Hi,
    I have been trying to figure out how to automate the Acrobat Reader plugin in Internet Explorer. My goal is to find a way to allow users of our web application to print PDFs to the default printer without having to go through the plugin's GUI. Our application includes a browser helper component, and I had hoped it would be possible to use the IWebBrowser2 interface's get_Document() method to get at some sort of interface to the plugin (as is possible for, say, a Word document hosted in Internet Explorer) and then use this to print the document. However, this does not work: get_Document(), when called on an IWebBrowser2 instance with a PDF loaded, returns E_NOINTERFACE. I also tried calling the IWebBrowser2 interface's ExecWB() method with OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER, and PRINT_DONTBOTHERUSER, and printed a blank page rather than the PDF.
    Is it possible to do what I am attempting? Like I said, my core goal is to print a PDF from within Internet Explorer without requiring user interaction. I'd appreciate any suggestions as to how I might accomplish this -- it doesn't _have_ to be by automating the plugin (maybe that is a the wrong approach... though it sure would be nice if the plugin provided access to its object model via IWebBrowser2->get_Document()).
    Thanks in Advance,
    Steve Mckinney
    Senior Developer
    Paxon Corporation

    IF that were entirely true, then the whole purpose of this thread is moot (automating printing server side). It is possible to load the file via URLs using the following html code:
    "<"body>
    "<"OBJECT id="pdf"
    type="application/pdf"
    width=800
    height=600 >
    "<"param name="src" value="http://localhost/pdfs/vorder_nc.pdf"/>
    "<"/OBJECT>
    "<"script language="JavaScript">
    function waitLoad()
    setTimeout("printFile()",2000);
    function printFile()
    var objPdf = document.getElementById('pdf');
    objPdf.PrintAllFit(1);
    "<"/script>
    "<"/body>
    So, if I used php or some other scripting language on the server to fill in the name of the pdf, I can load it via a URL, wait a couple of seconds for it to load, and then print it without user interaction. I wish that the LoadFile method would load a URL so that when it returns, I know it is loaded and I don't have to put faith in a timer that may not be enough for a large file.
    This is the situation I'm in. This way works but I don't like the timer. I'd rather have the plugin let me know when it's loaded. Is there another method that can help me do what I want?
    Thank again.

Maybe you are looking for

  • Create new folder in iphoto before download so as not to crowd the library

    ok - getting frustrated - just installed iphoto 6 - hoping that it would be easier = more direct when I download from memory card... no luck. Problem: I created now Folder on left hand side... under library/last roll/last 12 month... wanted to drag t

  • How do I get my calendar from my iPad onto iCal?

    I have an iCloud account set up and I have made sure everything is enabled in order to sync my calendar with iCal on my mac. I'm not sure what else to do. All of my software is up to date.

  • How to recover missing purchased items from my old region???

    Hi, Before 2 months ago I'm tried to change my region in the Apple Store and I was have a problem it I can not change the area until the reset my balance to 0 and it was I have a balance of 0.40 pounds, I contacted with the technical support at Apple

  • Need some help with button JavaScript for Save As event.

    Hi, I'm using Adobe Acrobat X Pro and am completely new to scripting forms in Adobe (completely new to Adobe Acrobat as well!).  On a form there is a save button that opens the Save As dialog by using a trigger (Mouse Up) and action (Execute a menu i

  • Making an entire block invisible.

    Hi , How to make an entire block in the selection screen invisible . I know this is done in At-selection screen output. but do not know how to code. I have two blocks and based on condition , on of the blocks should be set to invisible . How to do th