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

Similar Messages

  • Need to generate a report for 30 Million records

    HI Gurus,
              We have a requirement wherein we need to generate a report with 30-32 million records on a monthly basis and store the report in some external system via FTP. We estimated the size of the file to be around 2.5 GB. Is it possibloe to save the file in PDF ? or is it possible to store such file in anyother file type?
    Kindly let me know..
    Cheers...
    Nip

    Hi,
    If you are using 7.0 then you can save the file as a PDF file. Would suggest you precalculate while running the report as well.
    Cheers,
    Kedar

  • 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

  • Need to generate a CSR for a new Lync 2013 Edge server

    I am upgrading my Lync 2010 Edge to 2013. Part of the process is exporting all the certificates on the 2010, some public, and eventually importing them into my 2013 Edge. I have a problem with one certificate that was generated by our internal CA for the
    2010 server itself named servername.domain.local. Since my new Edge will be renamed to the same name as the old Edge, I was planning on exporting this certificate but the private key can't be exported. The option is grayed out.
    I need to therefore figure out how to get a certificate on my new Edge. No Lync software has been installed yet. What is the best way to generate a CSR so I can manually create a certificate on my internal CA. Since I don't have access to the internal CA
    from the DMZ, I need to do it this way. I am thinking maybe the MMC but maybe Windows PowerShell? Once I get the CSR generated, I will figure out how to create a certificate on my internal CA.
    I know I can do it during the Lync install but I wanted to have it ready on the server when installing.

    The option is most likely grayed out, because the private key was not marked as exportable.
    Now, you can either request the certificate by using the Deployment Tool and requesting the certificates, selecting offline and then manually copying the CSR to your Internal CA (and the certificate back)
    Or you can use Powershell and do a Request-CsCertificate (see here: http://technet.microsoft.com/en-us/library/gg425723.aspx)
    Try something like this: Request-CsCertificate -New -Type Internal -ComputerFqdn "lyncedge.domain.com" -FriendlyName "Internal Edge"
    -Template jcila -PrivateKeyExportable $True -DomainName "edge.domain.com" -Output C:\path\test.req​
    If this helped you please click "Vote As Helpful" if it answered your question please click "Mark As Answer"
    Georg Thomas | Lync MVP
    Blog www.lynced.com.au | Twitter
    @georgathomas
    Lync Edge Port Check (Beta)
    This forum post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Need help generating variable name for timeout object

    Below is a function I am using to scale an object down and
    then hide it. It works fine on just one object, but if I try to run
    it on multiple objects at the same time, only the last object gets
    scaled down. I believe this is because the timeout list only ever
    has a single item in it, “ShrinkTimeOut”.
    Does each entity in the timeout list need a distinct name?
    And if so, how would I dynamically generate a name and save it so I
    can kill the timeout object once the object has scaled down fully?

    > Does it look like I am getting rid of the timeout object
    properly in my code?
    Now that you mention it, and I have a look, no - it doesn't:
    //not sure of the order of parameters here:
    function fShrinkLoop(mModel, aTimeout) {
    //Creates a variable that contains the vector value of the
    model's
    scale (vector( 1.0000, 1.0000, 1.0000 )).
    nScaleVector = mModel.getPropRef("transform").scale;
    //Checks to see if the model is 1% or less than its original
    size.
    if (nScaleVector[1]<=0.01) {
    //Makes the model invisible.
    mModel.visibility = symbol("none");
    //Kills the timeout object.
    aTimeout.forget();
    } else {
    //If it is not, we scale the model down further and allow
    the loop to
    repeat.
    mModel.scale(0.9);

  • Need to generate a report for Event collection rules created in SCOM

    Hi All,
    Can any one let me know where can i get a report of the Event based collection rules created in SCOM (For default and custom made).
    I used the below report but it gives the collection rules which are performance counter based not event collection based.
    Reporting -> Microsoft Generic report library ->Performance detail (Gives performance based Collection rule but not event based). Can any one help.
    Gautam.75801

    what is your objects setting?
    Suppose, I want to display the Windows Restart Event which is collected by "collection rule for windows Restarted Events" . from the Rules pane in Authoring workpsace, "collection rule for windows Restarted Events" is target on windows
    Server Operating system. As a result, my "custom event" report setting as
    1) Objects: objects instance of windows Operating system
    2) rules filter by rules name contains "windows Restarted Events"
    Roger

  • 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.

  • Need some info about Brushless Motor control

    Hi
       I am new to motion control and I am planning to control a Brushless Servo Motor. What I understand from  the motion control tutorials is that I need to use a high performance controller with a third party drive to control a brushless servo motor. Can anyone let me know if thats right and also help me out in finding some more information about Brushless Servo motors and how to control its motion.
    Thanks,
    Sada

    Sada,
    "Do u know where I can find some detailed information about controlling a brushless motor so that I can decide which of the two options to follow?"
    Servomotors
    The NI-Motion users manual has a section on brushless servo motors...
    NI-Motion User Manual
    The 7350 help file (the only Motion boards that can provide internal commutation) has a section on brushless servo motors.
    NI 7350 User Manual
    In almost everycase I am aware of, you will need to buy a UMI to interface with a brushless motor drive (the only case in which this wouldn't be true is if the Drive manufacturer created a drive specifically to cable directly to an NI Motion board).
    Feel free to ask more questions,
    Lorne Hengst
    Application Engineer
    National Instruments

  • Stepper motor control - missing MG17Motor ActiveX object

    Hello,
    I am trying to contrl Thorlabs TDC 001 using LabView 9 SP1. Whe I follow the tutorial to create an ActiveX control(http://www.thorlabs.com/images/TabImages/GuideToLabVIEWandAPT.pdf), I can't find the MG17Motor option even though I have installed Thorlabs APT.
    Does aanyone kknow how to solve this?
    Cheers!

    Hello,
    I used attached Labview code to manage stepper motor control (TDC001 Thorlabs) to translate a sample in my setup, but since some time I obtain an error constantly (attached log). This translation system still works properly with thorlabs software, it also worked with this code, therefore I am really confused why such an error occurs. I just got started with Labview and programme wasn't created by me, so maybe someone explain what is wrong.
    Thank you in advance, Vasili

  • DAQ and motor control in the same VI

    Hello,
    I am a beginner in labview and I am trying to control a maxon motor and run a NIDAQ at the same time. Basically, I need to measure the pressures and the angles at the same time and record these.
    The problem that I am facing is that when I execute the VI, the motor runs first and this is followed by the measurement. I have twiddled around with it a lot getting a lot of help from this community but I can't figure it out. No matter what I do the motor starts running first and after the motor has completed its movement then the DAQ takes the measurements.
    Is there any way to run the motor and the sensors together? I can run the motor seperately and I can run the sensors separately in their own VIs but can't seem to run them sequentially.
    Any help would be appreciated.
    Aman
    Attachments:
    VI.jpg ‏64 KB

    In LabVIEW, your wires between VIs (and structures like While Loops) determine the order in which things happen.
    There are several approaches that you can take to de-couple the motor and DAQ processes.  The most obvious would be to put the motor control in one while loop, and the DAQ in another.  Yes, you can do this in LabVIEW.  Just don't get too carried away.  Each loop usually will go to a separate core to run.
    If there is data that has to be shared between the loops, you can use local variables, or the Value property nodes of the controls and indicators of your VI.
    Machine Vision, Robotics, Embedded Systems, Surveillance
    www.movimed.com - Custom Imaging Solutions

  • DC motor control

    dear all,
    I should control 2 DC servo motors with labviw.
    currently i have Labview 7.1 and PCI-6221 M-Series DAQ card.
    what i need is to implement a  control algorithm to control the motors at each millisecond.
    i actually have a profile of motion and i should differentiate it with respect to time for velocity and acceleration information and i dont know how to do that
    plz help me to solve my problem. 
    best regards,
    masood

    Masood,
    It will be difficult to develop a robust program for motion control using the PCI-6221.  The PCI-6221 DAQ card will only source 5 mA, which will most likely not be enough power to effectively drive both servo motors.  So the first thing you will need is a drive or amplifier for your motor.  Also, it will be very difficult, and probably impossible to get windows to run code deterministicly at 1ms intervals. 
    I would recommend using one of our motion controllers (7330, 7340 series controllers).  This would be the fastest and easiest method.  Another option would be our SoftMotion control module.  The SoftMotion control module will be the the least expensive of the two.  If there is no budget for additional hardware/software, you will need to develop your own control algorithm. Here is some information to get you started:
    Introduction to Mechatronics
    http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=BD3CD96DA0C3692EE034080020E74861&p_...
    Fundamentals of Motion Control
    http://zone.ni.com/devzone/conceptd.nsf/webmain/722ECF56222AAD5086256F7B007072C4
    Basics of Feedback
    http://zone.ni.com/devzone/conceptd.nsf/webmain/147F72A0CD247A6586256841006AEC57?opendocument
    S. Arves S.
    National Instruments
    Applications Engineer

  • Could someone tell me how to control a small dc motor by using labeled and a NI 6008 daq. The motor is adjustable by using a pot that ranges between 0-V if that is of any additional benefit

     Could someone tell me how to control a small dc motor by using labeled and a NI 6008 daq.  The motor is adjustable by using a pot  that ranges between 0-V if that is of any additional benefit.

    Read the second thread you have a link to. While both of these will produce PWM signals, the first one is a couple of orders of magnitude too slow to do anything useful in control the speed of a motor, what you would see would be the motor run at the full speed, then stop for a period, then run at full speed, rather than at the "average of on and off"  as the Pulse Widths will be very long relative to the motor's response. The second one has a better chance, IF all you want to do is run the motor. If there is any other calculations ...   Look at both and try and get an understanding of what they are doing. For PWM speed control of a motor you really need a pretty fast pulse width, and probably some filtering to smooth out the resulting "harsh" waveform, giving you the "average" voltage resulting from the PWM.
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • New to Motor Control, Seeking best approach

    Hi...  I have an upcoming task where we want to have a LabVIEW based motor control applied to a round, rotatable table inside a coating chamber.  The table will be on the order of 20 inches in diameter, made of aluminum and I will guess that it might weigh around 10 pounds.  We will have four equally spaced quadrants where a silicon wafer will sit in each quadrant.  On command we want the table to move to one of four locations where it will hold for quite some time (minutes to hours) while that one wafer is exposed to coating material.  Then we will want it to move to the other three positions in a similar way.  We want to have feedback that the table is where we think it is and we want to be able to define and return to a "home" position when desired...   There is a possibility that we might also want small motors on each of the four individual stations, meaning we would add some planetary rotation capability for each quadrant while still having overall motion control of the larger 20" round platform..   I'm not yet sure of the desired rotation speed of the small planetary components. but let me guess at say from once per second to once per minute...  On the other side I can imagine a case where they might want these to truly "spin" at say 1000 rpm.  For the larger 20" table I would say that needs only to be able to move one quarter of a revolution in say 10 seconds but when it stops it needs to hold accurately...    
    We will have a PC running LabVIEW controlling this and other features of the process...  Certainly a PCI backplane will be available but we have budget to also buy other interface chassis if that's what is recommended... It's a one time deal so we only need to build one system.  
    I am seeking feedback on what's the best motor type, controller, interface, etc for this kind of application...  Your thoughts???   Any feedback will be much appreciated...  thanks.. bob...

    Hi Bob,
    Here are a couple of links to get you started:
    Configuring a Motion Control System
    This is a good general intro to motion control and breaks down what NI provides in the way of Motion drives and controllers as well as the pros and cons of the different types of motors we support. 
    NI Motion Hardware
    This is a break down of all the hardware we sell.
    http://www.ni.com/motion/
    Please let me know if you have questions after looking through these links.
    Message Edited by Michelle_B on 10-20-2008 02:35 PM
    --Michelle
    Instrument Control R&D
    National Instruments
    Instrument Control
    Machine Vision

  • Why does Labview VI pause intermittently during motor control while loop?

    I'm performing some biomechanical testing using Labview to control stepper motor actuators. I have a PCI-7334 controller card and a MID-7604 driver. The testing is run in load control using a while loop that sends a number of steps to the stepper motor that is proportional to the difference between the actual and desired load. The VI intermittently pauses though and sits in active for several seconds (~5 sec to 20 sec). What could cause this problem?
    Thank you in advance for your assistance.

    Without the subVIs it is hard to see what is going on.
    Some general comments:
    1. Block diagrams should be limited to the size of one screen.  Yours is over 4 times as wide as my 27" screen.
    2. Sequence structures should be avoided.  LabVIEW is a datflow language and only rarely are sequence structures required. There is almost certainly a way to write your program without them.
    3. The use of local variables should be avoided.  Again, they have a place but most likely they are not needed in your program. They are prone to race conditions, make extra data copies, and force execution in the UI thread.
    4. Floating point data types are not recommended as case selectors. They will be rounded and coerced to integers.
    5. Learn about the Producer/Consumer Design Pattern and state machines.  
    One possible cause of your slowdown is having the Write to Spreadsheet File.vi inside the while loop. This VI is convenient to use but it opens, writes, and closes the file each time it is called.  I have no way to tell how much data you write on each iteration but as the file grows the OS may need to re-allocate space for the file or fragment the file. These operations can be slow.
    Do you really want to Abort the program in the False case?  This will leave any outputs in the last state they had been set. This could have your motor(s) running, clutch engaged, ...  In programs which control physical hardware an orderly shutdown procedure is usually better: set all outputs to a safe condition, close files, close DAQ tasks, and indicate the status to the user.  Calling Stop allows none of this to happen.
    Lynn

  • Position drift during the stepper motor controlled back and forth motion

    Hi everyone there,
    I get a headache position drift problem during the stepper motor controlled back and forth motion. I have been wroking on the problem for the last two weeks, and still can not figure it out. So I write down here my problem in hope of getting some clues from those have some experiences in stepper motor motion control.
    My goal is to use a stepper motor to drive a beam flage fixed onto the shaft to go back and forth for a certain angle, and this back and forth motion needs to be stable and reproducible within hours. With the SMD1 stepper motor driver, I only need to send in a pulse train to control the number of steps(the pulse frequency defines the stepping rate), and another pulse to controle the direction (i.e., cw or ccw). To do this, in LabView, I used the counter of the DAQ board to produce a finite pulse train to step the motor, and used one digital line to produce a pulse to switch the direction every 500ms, the timing is contolled by the software.(I used the oscilloscope to monitor these two pulses, the pulse train produced by the counter looks very stable, and delay between the pulse edges of the direction pulse and the pulse train is also very stable within 500ms. There seems no software timing problems at such a long delay.)  And this labview controlled motor appears to work perfectly as I required, the motor steps a defined number of steps at one direction, and then steps back at the origin position. But after running for a few minutes, the back position shifts gradually(I can not observe a obvious shift at the first few minutes) with repect to the origin position(the position I start running). I looked it up at the manual and also the website, I got a clue that this might because the motor steps at the resonace frequency of the motor and hence misses or takes extral steps sometimes. So I changed the steping rate from 1Hz to 1000Hz to see if the shift disappears or gets smaller at certain frequency range, but the shift always exists.
    I did observe the shift got smaller within the same running time when change the step model from full step (1.8degree/step)to half and quarter step model. According to this, the motor did miss steps (or pulses) during running, the quarter step model has smaller shift due to the smaller steps.  But I also noticed that the motor always shift at one direction, no matter I started with clockwise or counter-clockwise, this seems really strange to me. Because the motor should shift at each direction with the same probability if we assume the motor missis steps randomly.
    There is something must be wrong, either the labveiw program or the motor, but I don't even know a clue of this weird shift problem. And because of this, I haven't made any progress in my lab for the last three weeks. So any suggestions could be very helpful for solving this headache and will be really appreciated.
    Thanks a million in advance and Merry Christmas!
    Li

    Hey, Brian Beal,
    Thanks for your quick response. "accel" and "decel" mean acceleration and deceleration, am I understanding right?
    If yes, then I don't have these in my LabView program, I just generate one TTL pulse train and one TTL pulse with LabView and send them into the SMD1 stepper motor driver.
    The pulse train steps the shaft, and the other switchs the direction.
    Yesterday, I confirmed that if the motor steer always at one direction either CW or CCW, then the stepping were very stable, no missing or extra steps happen for hours.
    And I also observed that the motor took one extra step  from time to time when the direction changes. And this only happens when the direction switch from CW to CCW. (bizarre!)
    I guess this indicates that some pulse noise happens when the motor switch the direction too often.  But I just don't have any clue for irregular extra steps.

Maybe you are looking for