Linear encoder in LABview

I've managed to get three seperate sine waves out of my encoder. At this point i'm wondering what i have to do within labview to translate these three sine waves into some sort of position indication.
Here is some information:
The DAQ card that I have is a PCI-MIO-16e-1 The linear encoder that i'm attempting to use it a RSF Elektronik MS 6x i can't find the data sheet for the exact model but i've attached a pdf which talks about the variouis signals that it outputs. Also the table below is a table that I found in the documentation for the MS 6x that I have which explains the various pin outputs of the encoder. I hope this help please let me know if you need any further information.
Pin                   Signal
1                      +5 V                                                                Supply
2                      V Gnd              Analog ground              Output 2,5 V typical
3                      R1                    Analog voltage signal
4                      A2                   Analog voltage signal                2 Vss typical
5                      A1                   Analog voltage signal                2 Vss typical
6                      0V
Attachments:
44769_5.pdf ‏124 KB

Duplicate post
Regards,
André
Using whatever version of LV the customer requires. (LV5.1-LV2012) (www.carya.nl)

Similar Messages

  • Linear encoder (newall SGH) controlled with motion cotnroll UMI7764 and LabView

    Hi,
    I would like to intsall my linear encoder (SGH PC) onto the motion controll box (UMI7764). After that I have to use LabView to controll the encoder. It should give me the position of a piston and also the limits for this piston. So at first I just want to controll the position of the piston and then give the limits or controll the piston with it.
    My problem is I have no idea how? How can I get my signals out of the encoder into my LabView programm? I got the key for the pins but still unclear how to get my signals and what to do with them.
    Sorry, I am not used to use LabView. 
    Thanx

    Oh, ist mein Englisch so schlecht
    Dann formuliere ich meine Aufgabe einfach noch mal auf Deutsch um Missverstaendnisse auszuloeschen.
    Meine Aufgabe ist es einen Linear Encoder (SGH PC) an einen Piston (wie heisst das auf Deustch?) anzubringen und anzusteuern. Zunaechst soll nur die Position des Piston damit bestimmt werden, danach aber auch Vorgaben gesetzt werden. Heisst, ich gebe eine Routine vor und der Piston macht das dann hoffentlich auch.
    Um den Encoder ansteuern und auslesen zu koennen stehen mir eine Motion Controll Card (UMI 7764) und eine PCI 7324, sowie LabView 8.6.
    Zur Zeit sind wir noch mit der Installation des Encoders beschaeftigt, doch bald werd ich auch programmtechnisch handlegen muessen. Leider hab ich noch nie mit einer PCI oder all dem Anderem gearbeitet und kenne mich daher nicht damit aus. 
    Fang ich also mit einer Grundlegenden Frage an: Hat LabView ein VI was es mir ermoeglicht die benoetigten Kanaele aus dem PCI auslesen zu lassen und wieder zu schliessen? Dann waere die Positionsbestimmung ja hoffentlich nciht so kompliziert.

  • Linear Encoder and Configure Logging

    Hi All,
    I am currently using a PCI-6280 M-series board with LV2010.
    I have a Linear Encoder in X4 mode connected to Counter 0 and I was wondering if it is possible to stream the values on the counter as it keeps track of the distance into a TDMS file using "DAQmx Configure Logging" .  I tried this using MAX to configure this, but it does not seem to work, so I'm just wondering if this is even possible as I couldn't seem to find anything online about doing this.
    Thanks,
    Lester
    Solved!
    Go to Solution.

    Hi Lester,
    My apologies, I tried it out on a different board. It can work with yours, too, though. There is an example of a buffered counter task that should allow you to log the data by adding in the Configure Logging VI like we did before.
    Open LabVIEW and go to Help >> Find Examples... it will open the Example Finder. In the Example Finder, expand the folders to get to Hardware Input and Output >> DAQmx >> Counter Measurements >> Count Digital Events >> Count Digital Events-Buffered-Countinuous-Ext Clk.vi
    Put the correct counter channel and PFI channel in the controls, and run the VI to see what it does. Then you can modify the block diagram to add the Configure Logging VI (the same way as before) and run the VI again. You will end up with a TDMS log saved at the path you wire into the Configure Logging VI.
    I hope that helps.
    Regards,
    Daniel H.
    Customer Education Product Support Engineer
    National Instruments
    Certified LabVIEW Developer

  • Linear encoder

    Hi All
    I want to record the position(rotation) signal. If there are 1024 pulse per revolution, I want the position signal to increase linearly(1023,1024,1025......). Shall I use Linear encoder or Angular encoder (From DAQmx creat virtual channel).
    I am using NI-9411.
    Thank you!
    Solved!
    Go to Solution.

    Hi lvymerciqq,
    For Devices without Counters:
    Your module, the NI-9411 doesn't have any on board counters, so unfortunately you cannot use counter functions such as the Linear/Angular encoder DAQmx channel VIs. If you're using a Compact RIO, you can make use of Counters for the device via the use of Scan Mode (You can see this in the NI Example Finder). However, if you're using a Compact DAQ then there are no Counters to make use of so we'd have to implement our own methods in order to clock the signals. For now, I'd think that this application would be limited by being software driven (i.e. making the OS check that a rising edge has occured) however I'm going to do some research and see whether or not there are other possibilities that can be explored; however it won't consist of such a simple solution as just dropping down a single polymorphic VI.
    For Devices with Counters:
    You can configure a Counter task to count the number of rising edges recieved from the encoder; therefore this number will increment on every increased rotation of the encoder. You'll have to be careful with respect to this number rolling over, however. This is when you reach the maximum count of your counter task and then it resets back to 0; this changes from device to device as different counters have different resolutions.
    Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

  • Do I have to use an external clock with a cDAQ-9188 and NI 9401 to read a linear encoder? I'm seeing error message that implies that but the example code doesn't show it.

    We can set up a task that works on demand but when we go to continuous sampleing we see Error -200303, which claims an external sample clock source must be specified for this application.  However, some of the NI linear encoder example code doesn't show that (uses the cDAQ 80 Mhz clock) and the documentation didn't mention that. 

    It's mentioned in the 918x user manual:
    Unlike analog input, analog output, digital input, and digital output, the cDAQ chassis counters do not have the ability to divide down a timebase to produce an internal counter sample clock.  For sample clocked operations, an external signal must be provided to supply a clock source.  The source can be any of the following signals:
    AI Sample Clock
    AI Start Trigger
    AI Reference Trigger
    AO Sample Clock
    DI Sample Clock
    DI Start Trigger
    DO Sample Clock
    CTR n Internal Output
    Freq Out
    PFI
    Change Detection Event
    Analog Comparison Event
    Assuming you have at least one available counter (there are 4 on the backplane), I would suggest to configure a continuous counter output task and use its internal output as the sample clock.  Specify the internal counter using an "_" for example "cDAQ1/_ctr0".  The terminal to use for the sample clock source would be for example "/cDAQ1/Ctr0InternalOutput".
    Which example uses the 80 MHz timebase as a sample clock?  It is far too fast for a sample clock on the 9188 according to the throughput benchmarks (80 MHz * 4 byte samples = 320 MB/s).  There is also no direct route between the 80 MHz timebase and the sample clock terminal for the counters--making this route would use a second counter anyway.
    Best Regards,
    John Passiak

  • How to read the position in an linear encoder, model AT112 from mitutoyo?

    Hello,
    any one knows how to read the positon in a linear encoder, model AT112 from mitutoyo, that have the signal out in the sinusoidal form?
    thanks

    Hello Hugo,
    In order to help you efficiency, please contact National Instruments (01.48.14.24.24) with the reference number 409230.
    I will personnally help you to connect your linear encoder.
    Regards.

  • Renishaw Linear Encoder (Find HOME)

    I have Renishaw RGH22X Series Readhead optical linear encodes on the X&Y Axis. The encoders provide 25,400 pulses per inch (1000/mm) and are about 16 inches in length. I am working in "Open Loop Pulse Mode" sending step/direction.
    These encoders share a forward and reverse limit switch. Basically, a 0.25 VDC output is measured if the drive is between the limit switches, but if the drive hits a limit (either one), the voltage drops to zero.
    The encoder is also equipped with a "reference" switch which provides a single pulse between X and Xnot. The limit swith is suppose to be used to accurately "home" the axis. Unfortunately, I am having trouble trying to "home" the axis. The X or Xnot trigger has not been sensed when wired to t
    he "home" input on the UMI-7764. I have verified, that if a standard 5 VDC Signal, or 0 VDC depending on the Axis setup, is used, the "home" state is sensed. However, the reference pulse is not being seen (either X or Xnot) when wired directly to the "home" input.
    I tried to find a "reference" pulse to home the drive but the drive needs to move further than a single rotation since the refernce pulse is located on a single end of the encoder. I have not been successfull using this approach and then learned that find reference is not supported in Open Loop Stepper Mode.
    Is it possible to "home" this system using the signals available from the Renishaw encoders? What must be done to establish home?
    Regards,
    Guy

    Guy,
    Thank you for contacting National Instruments. I believe that you were able to speak with another engineer over here to get that question resolved, but I just wanted to post the results in case you had other questions or other users are interested.
    Because the encoder you are using is very fine, it returns a large number of pulses every second; this obviously will make the pulse width very small. If you look at the specifications for the Home inputs of the 7344, then we can see where it requires a 1 ms minimum pulse width. In your current setup, the system is moving fast enough to where that pulse is coming in too quickly for the motion controller to detect.
    In order to correct this, we can develop an application where we slow down the velocity of the mo
    tor. By doing this, we should be able to successfully detect the pulse and reliably find the home switch in your system.
    Regards,
    Michael
    Applications Engineer
    National Instruments

  • Mircosoft Expression Encoder in LabVIEW

    I am trying to use the Mircosoft Expression Encoder in LabVIEW, Mircosoft support the SDK, it can be download from http://www.microsoft.com/downloads/en/details.aspx​?FamilyID=5c3c5f97-678c-4c99-a7fc-f84f320c626f
    I google this topic, it seems some one has done this and put a LabVIEW 2009 VI in LAVA, see my attachment.
    The problem is I cannot use the dll in LabVIEW, it give me "The selected file is not a .NET assembly, type library or automation executable." I don't know is the dll's problem or LabVIEW problem.
    Attachments:
    ExpressionEncoder.vi ‏31 KB
    Microsoft.Expression.Encoder.zip ‏433 KB

    The problem is that this is a .NET 4.0 assembly. LabVIEW only supports .NET 3.5 assemblies. I am not familiar with this component, but you might check to see if there is some earlier or alternative version built for .NET 3.5.
    Jarrod S.
    National Instruments

  • Linear Encoder, Counting Ticks

    To all,
    I have the VI created for the linear encoder and everything works fine, except when it comes to counting ticks.  When the encoder moves in the positive direction from initial position, the ticks are counted correctly, but when I move the encoder in the negative direction from the initial position, the encoder immediately reads "4.29E+9".  It continually reads this value moving backwards, and will not accurately measure position until the encoder has been moved an equal distance forward, back to its initial position, then it counts forward correctly.  Any speculation as to why it reads this number?  Any suggestions for fixing?
    Thanks,
    Owen

    Could you please make a trial with an example from NI ?
    LV Menu >> Help >> Find Examples... >> Hardware Input and Output >> DAQmx >> Counter Measurements >> Position >> Measure Angular Position.vi
    You can easily adapt it for a linear encoder but even the original version will allow you to check your setup. Please read the NI-DAQmx help for the default terminals for your DAQ card.

  • DAQ device for linear encoder & labview 7.0

    Ok, I am in a bit of a bind, so the quicker the response the better =).    I currently have Labview 7.0, and am needing to read the pulses of a MicroE hi-res encoder.  I know I am in need of a DAQ device, so I just want to know which one would be the best (cost-effective & easy to manipulate with Labview).   Also, I need three analog inputs as well.  Preferably the range of the analog inputs would be 0-10 volts (well, preferably 0-10mv, but that is unikely).  I am very unfamiliar with programming Labview, but will learn what I need .
    Thank you VERY much!

    Hello heepofajeep,
    I would highly recommend you go with an M-Series Mulitfunciton DAQ Device for this application.  The two counter channels on these devices have expanded support for two phase relative linear and angular encoders, compared to older E Series devices.  In addition, these devices are capable of performing analog input, analog output, and digital I/O operations.  They contain a minimum of 16 analog input lines, with a programmable gain amplifier that will allow you to programmatically set the range anywhere as large as +/-10V to +/-0.1V in order to take full advantage of the resolution of the ADC on the device.  These devices can be programmed in LabVIEW 7.0 or later with the NI-DAQmx driver, and there is the DAQ Assistant and many great example programs for getting up and running with your application quickly.
    I hope this information helps and let us know if you have any further questions.
    Regards,
    Travis G.
    Applications Engineering
    National Instruments
    www.ni.com/support
    Message Edited by Travis G. on 08-18-2006 04:55 PM

  • MP3 Encoder in LabVIEW

    Hallo,
    Has anyone experience in integrating a MP3 encoder engine into LabVIEW.
    I've thought of taking the LAME encoder as dll, but I haven't found any
    documentation for usage of the dll. Can anybody help me?
    Oliver Friedrich

    Hi Oliver,
    There is an mp3 example program on NI's website that is available for download. It basically uses activex calls to run windows media player. If you want to have a standalone mp3 player, you may be better off searching the mp3 forums for an encoder dll or source code that you can compile into a dll or exe. In any case, here's the link. Enjoy!
    Jeremy L.
    National Instruments
    Jeremy L.
    National Instruments

  • Simple control of a linear actuator through LabVIEW advice

    Hello all,
    Was in need of some quick guidance. I purchased a Firgelli PQ12 linear actuator along with their LAC control board. They provide a sample LabVIEW program which I was able to run properly. What I would like to do is create my own LavVIEW program for the motor, basically with two inputs; stroke length, time. I would like for the actuator's stroke to simply extend and retract for a desired time period. What is the best way to go about creating a LabVIEW program for a DC motor? Any tutorials available for this application? Advice? Any help is appreciated. 
    Thank you!
    Edit - Details on what is being used
    http://www.firgelli.com/Uploads/PQ12_datasheet.pdf
    http://www.firgelli.com/Uploads/LAC_Datasheet.pdf

    Are you looking to use just basic LabVIEW? Or do you have any toolkits or modules? Here are a few links to an example and tutorial regarding DC motor control in LabVIEW:
    -Open and Closed Loop DC Motor Control VI
    http://zone.ni.com/devzone/cda/epd/p/id/4953
    -Using the LabVIEW PID Control Toolkit with the LabVIEW Control Desgin and Simulation Module
    http://www.ni.com/white-paper/6931/en#toc1
    Daniel K | NI Applications Engineer | Certified LabVIEW Developer

  • Linear stage and Labview SmartMotor driver

    I am seeking a solution of controlling a linera stage with Labview:
    Stroke ~ 18 inch
    Resolution ~ 0.1 mm
    Low price.
    Do you have any recommendation on HW and SW? We are evaluating Animatics SmartMotor. Do you have a Labview for it? How EASY to program it for a simple scan motion? Thanks.

    You are trying to complete a force feedback application in a non-deterministic system (Windows) which may or may not work well depending on your control timing requirements. 
    You will need to use the DAQmx driver to acquire signals from your X Series device continuously at a set sample rate. See the LabVIEW example finder for a ready made example of how to do this.
    The values you read will have to be compared to your desired setpoint like you mentioned.
    The output of this comparison should be used to control the movement of the actuator. The actuator you are using looks like it has a LabVIEW driver.
    You can set up the motion of the system in a few different ways. One way (probably better with a windows system)
    perform a small incremental move with the stage
    measure the load and compare to desired value
    perform another small incremental move, or hold current position depending on the feedback
    Another way:
    perform a slow continuous move while continuously monitoring your feedback signal (loadcell)
    When the loadcell reaches a certain value, stop the move and hold current position
    The recommended way to do this as accurately and with as much flexibilty as possible would be with a deterministic real-time system where you are using the load cell as the primary feedback device to the motion control system. This is called a force feedback application. With this type of setup, you can actually define your setpoint in terms of force instead of position. This lets you do things like define a force profile to follow, and other more advanced concepts. All your sampling rates are higher, and the system must be deterministic to properly maintain a stable motion torque control loop.
    My recommendation would be to start with the DAQmx example, add in the comparison code, and then add in the commands to the actuator based on your logic. 
    Good Luck!
    ~Nate

  • Simulating Optical encoder in LabVIEW

    I need to reproduce the behavior of an Optical Encoder. The idea would be able to determine the speed and the direction in which the user is turning a knob or a dial in a graphical interface. It is possible to join the two end of a knob 0 and 10 by selecting the Position/Size/Select tool and moving the value 10 of the indicator toward the 0. I don't know if there is something that already exist.
    Best regards,
    Nitrof

    Nitrof wrote:
    > I need to reproduce the behavior of an Optical Encoder. The idea
    > would be able to determine the speed and the direction in which the
    > user is turning a knob or a dial in a graphical interface. It is
    > possible to join the two end of a knob 0 and 10 by selecting the
    > Position/Size/Select tool and moving the value 10 of the indicator
    > toward the 0. I don't know if there is something that already exist.
    >
    > Best regards,
    >
    > Nitrof
    I don't think there is a control that does this. To work just like an
    optical encoder it would be nice to be able to cast the control to an
    enumeration (enumerations wrap around on increment). It would also be
    nice to incorporate the counting into the control, like a multiple turn
    potentiometer that never
    runs out. Next, you could make something using
    the picture control and the mouse position; I might try this just for
    fun. Also, there are other ActiveX controls used in Visual Basic, etc
    that you can import.

  • 6602 as X4 encoder/ex​ternal clock

    Hello,
    Im trying to use a PCI 6602 to read the output of a linear encoder.  I have a few (I think simple) questions about setting things up...
    Right now I am only using CTR 0 (channel A hooked up to pin 2, B to 40, and Z to 3).  I have been trying to use the DAQ assistant to set up the code.  When i change the acquisition mode to continuous, it asks me to specify a clock type and source.  The only option I am given for clock type is external (is this right?), and for source I have options like PFIxx or RTSxx.  None of these source options seem to allow me to acquire data in continuous mode (The "test" routine doesn't read back anything).  Any suggestions on what I should be doing differently?  Don't feel bad about "dumbing down" your reply :-)  Any info is useful, I'm pretty new to Labview...
    Thanks

    I don't have an LV machine available near my network PC and have only been able to look at the screenshots.  To be perfectly frank, I see far too many issues to address and tutor individually with the limited time I have.  As friendly advice, I would *strongly* recommend backing up several steps and first make an app that works with 1 encoder.  Once you get through that part of the learning curve, *then* add the other encoder channels to your app.  Then my prior post about DMA and interrupts will become relevant again.
    Other things:
    1. I really, *really*, think you've got the wrong idea about how the counters measure encoder signals.  You do NOT need to sample at 2x the encoder pulse rate, the Nyquist theorem does NOT apply here.  The hardware count register tracks encoder position accurately with your 400 kHz encoder signals.  Your app is free to choose how often to sample that count register according to your needs.  This may be anywhere from 1 Hz or less to several kHz.  It does NOT need to approach 1 MHz and even if you tried, the system is almost certain to be incapable of such a rate.
    2. After all the talk about sampling at 1 MHz, you have a software loop that reads 1 single value at a time from each encoder and has a timer to run it only once every 10 msec.  There is a *very* fundamental disconnect here.  (It also appears that you have optional file writes inside the same loop, another factor that'll slow you down.)
    3. The encoder readings are not hardware-sync'ed in time -- the first value read from each represents their positions at different points in time.  With such high-precision encoders, I'd think you would need hardware sync on the read times.
    Finally, why not give us an overall description of your app's needs?  Kind of a big picture description.  I know you've told us what you think the problems are, but I'd wager my NI screwdriver that the 1 MHz sampling rate you think is your main problem will turn out not to be relevant. 
    -Kevin P.
    I don't have an LV machine available near my network PC and have only been able to look at the screenshots.  To be perfectly frank, I see far too many issues to address and tutor individually with the limited time I have.  As friendly advice, I would *strongly* recommend backing up several steps and first make an app that works with 1 encoder.  Once you get through that part of the learning curve, *then* add the other encoder channels to your app.  Then my prior post about DMA and interrupts will become relevant again.
    Other things:
    1. I really, *really*, think you've got the wrong idea about how the counters measure encoder signals.  You do NOT need to sample at 2x the encoder pulse rate, the Nyquist theorem does NOT apply here.  The hardware count register tracks encoder position accurately with your 400 kHz encoder signals.  Your app is free to choose how often to sample that count register according to your needs.  This may be anywhere from 1 Hz or less to several kHz.  It does NOT need to approach 1 MHz and even if you tried, the system is almost certain to be incapable of such a rate.
    2. After all the talk about sampling at 1 MHz, you have a software loop that reads 1 single value at a time from each encoder and has a timer to run it only once every 10 msec.  There is a *very* fundamental disconnect here.  (It also appears that you have optional file writes inside the same loop, another factor that'll slow you down.)
    3. The encoder readings are not hardware-sync'ed in time -- the first value read from each represents their positions at different points in time.  With such high-precision encoders, I'd think you would need hardware sync on the read times.
    Finally, why not give us an overall description of your app's needs?  Kind of a big picture description.  I know you've told us what you think the problems are, but I'd wager my NI screwdriver that the 1 MHz sampling rate you think is your main problem will turn out not to be relevant. 
    -Kevin P.

Maybe you are looking for