Simulate quadrature encoder output without hardware

I am brand new to Labview and have not had any training other than youtube and this fine forum. I am a mechanic trying to solve a problem using labview. I am posting this new question because I don’t have any hardware so I can’t use the examples I’ve seen others pointing to.
I’m trying to simulate the output of a quadrature rotary encoder. Once I have done that I want to use Labview to program an instrument that reads that signal and makes mathematical calculations to it but I need the signal first. The encoder will attach to a shaft that will rotate clockwise and then counterclockwise at a rate of about 122 times a minute.  The total shaft rotation will be between 0 - 18 degrees. It is important to me to know the direction of the shaft. The quadrature encoder will send out 2 square waves with one wave behind the other. The way I’ve tried to do this is by using 2 Simulate Signal modules each sending out a square wave at 2 Hz. I’ve connected a single knob controller to the both frequency inputs of the signal modules to simulate the speed the shaft rotates back and forth. I’ve done the exact same thing to the amplitude input to simulate the degrees the shaft turns before changing directions. My problem is the changing directions. I can delay the phase, which is what I want to do, but I can’t do it in real time and I can’t do it in a single 180 degree step. What I would like is a switch to change the B channel from +90 to -90 when it is toggled. If I could then toggle the switch when the amplitude reaches 18 degrees or less I will have an encoder signal. Thanks for any help you can provide.
steve
Attachments:
Rotory Encoder.vi ‏59 KB

Steve,
From what I understand, you want to make a 180 degree phase shift every N intervals?  I modified your code to do this.  Let me know if that gets at what you are doing.
Cheers,
Chris LS
National Instruments
Applications Engineer
Visit ni.com/gettingstarted for step-by-step help in setting up your system.
Attachments:
Rotory EncoderEdit.vi ‏61 KB

Similar Messages

  • Quadrature encoder

    Hi,
    I'm trying to make an position measurment with a quadrature encoder.
    My hardware is a6031E card, and I 'm using DAQmx 7.4.0.
    I read the AN84. So I connected Channel A to Ctrl0_src (PFI8) and
    Channel B to ctrl0_up-down (Port0.6). I used the
    "quad_encoder_with_E-series_(STC)-daqmx.vi".
    It first didn't work : il was counting up and not down or the opposite whether I was couting rising or falling edge.
    Then it worked (I cannot see what I changed, I think I did not change anything but it's impossible).
    And now, it doesn't work anymore. Even when I create a global channel
    and test it in MAX, it counts up good, but when irotate the shaft the
    other sense, it stays at his level and doesn't count down.
    Can somebody telle me where I made a mistake and what I forgot.
    Thanks.

    Merci de me répondre.
    J'avais bien configuré mon compteur en "controllé de manière externe" mais ça ne marchait pas.
    J'ai trouvé la réponse ce matin : mon codeur disposait de sorties
    totem-pole, et je l'alimentait en 12Vdc. J'ai vérifié la doc ce matin,
    et le fabricant garantit un niveau bas maximum de ... 2 Volts. En fait,
    des fois, il descendait en dessous du niveau d'acceptation bas TTL et
    souvent non ! Du coup, avec 2 volts sur mon entrée count up-down, je me
    trouvais souvent dans une sorte d'idle state, puisque mon signal sur
    cette broche était plus haut que le niveau d'acceptation bas TTL et
    plus bas que le niveau d'acceptation haut TTL.
    J'ai changé de compteur pour un avec des sorties TTL directes, et tout marche parfaitemement bien.
    Merci encore de vous être intéressée à mon problème,
    Bonne fin de journée,
    Olivier Quillard

  • How to simulate a DAQ device and use it for testing applicatio​ns without hardware??​?

                            how do i simulate a DAQ device
    in MAX and use it for testing applications without  hardware???
    If my application requires inputs
    from external hardware to proceed how can I simulate a DAQ device in LabVEIW?
    i need to simulate several Digital inputs and Outputs to test the software. currently i dont have the hardware and DAQ device here. 
    please reply with your valuable suggestions. 
    many thanks in advance
    RENN 
    Kudos always welcome for helpful posts
    Solved!
    Go to Solution.

    Hi,
          There is no option to simulate traditional device.You need hardware for that so i would suggest to simulate a PXI device which has similar configuration to PCI-6014 and to do a small modification to your application..

  • 2-Bit Quadrature Encoder without counters

    I've noticed that the internal help in LabVIEW only mentioned Quadrature Encoders in terms of reading them with the counter inputs of a device that supports that type of reading. In case your DAQ does not support those counter inputs, such as the NI USB-6008, here is a LabVIEW VI that reads the output of a 2-bit encoder such as the Grayhill 61C22-01-04-02 optical encoder, and also reads its pushbutton output. Note that this would be called an "X4 decoding" in LabVIEW terms when referring to the decoding operation that it implements.
    Datasheet: http://eceserv0.ece.wisc.edu/~morrow/ECE315/ARM7-FPGA/datasheets/grayhill_61C.pdf
    Wire the encoder up with the load resistors listed in second page of the datasheet, and tie one of the pushbutton pins to 5V.
    The VI labels the physical channels that you should wire up to. Example:
    DAQmx Device Name: Dev1
    Encoder 5V Supply Channel: /port0/line0
    Note that I delete the device name from the channel selector, so "Dev1/port0/line0" becomes "/port0/line0". I only break the Device and channel names into 2 selectors because I swap DAQs often and I prefer to write my programs to just take a single "DAQmx Device" input that I can change in one place, then leave all the other lines the same. Just a little quirk of mine I guess.
    The "X4 Quadrature Encoder (SubVI).vi" and its subVIs are the ones doing the work, the parent VI is just an example of how to use them.
    I hope this helps somebody.
    Ryan R.
    R&D
    Attachments:
    Rotary Encoder Example.llb ‏100 KB

    This was very helpful actually, thanks!

  • Can I use the 'Export Signal Property Node' on a quadrature encoder?

    Hi,
    So I don't know which counter board I'd be using yet for this (it's used in conjunction with a PCI-6280--the PCI-6280's counter inputs are all taken and so I need another board), but assuming this is possible at all in DAQmx I wouldn't mind knowing whether, say, the PCI-6601 (or any other timer board for that matter) could do this. I'm programming this in LabVIEW 2010 by the way. 
    I want to have a counter which counts the number of pulses on one channel (I'll call this the 'clock' channel) between when another channel goes from low to high (which I'll call the trigger). It's basically a pulse width measurement, but I only care if there are more than n clock pulses between triggers. I need to have a hardware-timed digital signal which goes from low to high if there are ever more than n pulses between trigger changing state from low to high. 
    What I am planning to do is this: 
    Wire 'trigger' to the z-input of the quadrature encoder, and set the z-input value to some arbitrary large value such that, at the quadrature encoder counter task's settings, the counter reaches terminal count in n pulses.
    Configure the quadrature encoder counter using DAQmx Export Signal Property Node (tutorial I was looking at is here: http://zone.ni.com/devzone/cda/tut/p/id/5387 ) to toggle a digital channel ('counter event output') from low to high if the counter reaches terminal count (ie, if the encoder reads n pulses).
    If the encoder ever reads n pulses on 'clock' between two rising pulses on 'trigger', it sets counter event output high.
    Is this possible? Reading through the manual of M series PCI-62xx devices, the index pulse loads the counter with a particular value so it seems like you could conceivably set the counter to the terminal count if you wanted. My only real problem is whether DAQmx Export Signal Property Node works on all counter tasks or just on edge counting tasks. 
    Thanks in advance for your help. If this isn't possible, I can reply with more details on the problem this is supposed to solve so that you can help me figure out an alternate method.
    Solved!
    Go to Solution.

    There is probably a way to do it, but it it may be easier to use an X-series board for the job.   They support a new counter capability for count reset on a digital edge without needing to be configured in encoder position mode.  I am not sure exactly how that feature's been implemented however, so maybe it won't make things easier after all.
    The plan based on the hoped-for behavior: 
    1. Configure an X-series counter for pulse generation based on "ticks" of your clock channel.
    2. Set both initial delay and low time to the critical # of ticks.
    3. Configure for count reset on a digital edge (if possible in pulse generation mode)
    4. Configure the count reset value to be the critical # (or possibly 1 less, if possible in pulse generation mode)
    5. If you want the output to remain high indefinitely, configure the counter task to use its own output as a
    pause trigger, and pause while high.
    The way pulse generation works is to preload a # of "low time" ticks into the count register.  Then every source edge will decrement the count.  When the count reaches terminal count (0), the counter's output is toggled (or can be configured to pulse).  The register is then loaded with the # of "high time" ticks and the process continues.
    You would be perpetually interrupting the count-down process as long as you got your triggers in time.  The count would keep getting reset to the # of low counts, keep decrementing toward 0 without reaching it, and so on.  If ever you did reach 0, the output state would toggle high, then the high state would prevent subsequent clock signals from decrementing the count.
    You can conceivably do a similar thing with a 6601, but I'm pretty sure you'd need 2 counters working together to get it working.
    -Kevin P

  • How can I use flex motion control VI without hardware?

    I would like to try and simulate the motion control of my system before i hook up the motion control card. But when I use the VI in flex motion contro took kit it asks for address or something and gives me an error. Can't I just simulate without hardware?

    Hello,
    The only way you can use FlexMotion without any hardware is to set it up as Open Loop Stepper Control. Otherwise, you will get errors when no encoder signal is fed back to the controller.
    Please let me know if you have any further questions.
    Regards,
    Andy Bell
    Application Engineer
    National Instruments

  • How do you simulate an encoder using a virtual channel?

    I am trying to use MAX to simulate hardware so I can create a program before I purchase the hardware. I will be purchasing a USB-6211,  TTL quadrature encoder, and LVDT.
    I want to simulate a quadrature encoder and a LVDT. I have created a virtual channel for each and a virtual USB-6211.
    The LVDT is simulated by creating a virtual analog input channel. This virtual channel works when I test the vi.
    The encoder is simulated by creating a virtual angle counter. This virtual channel does not work when I test the vi.
    How do I get this virtual angle counter to work?

    Kristen,
    I do not get an error. The problem is that I do not get any action from the virtual channel.
     For
    example, when I created the virtual analog input channel, this channel
    provides a simulated varying voltage when I run the vi. The virtual
    angle counter channel does nothing at all when I run the vi.
    Attachments:
    Simulation Problem.vi ‏124 KB

  • How to route Quadrature Encoder signal to CC1 using PCIe 1429 + IO extension card

    Hi there,
    i am currently trying to interface the Basler L304kc to the NI PCIe 1429 + Cameralink IO extension board
    I want to operate the camera in Ex-SYNC level controlled mode. I would like to route external Quadrature Encoder signals (connected to the IO extension board) to the CC1 cameralink control of the camera
    Currently, I cannot find this option either in MAX or the Camera File Generator.The L304kc camera file only provides pre-defined pulses, or MAX only offers "External","ISO","RSTI" options for the CC1 sources.
    Is it possible to route the encoder signal from the IO extension board directly to the CC1 of the camera? Or is there a work-around?
    Thanks!
    Derek Chan
    Application Engineer
    Basler Asia Pte Ltd

    Hi Alex,
    I posted the following (similar) text to the support center but I think it is of common interest:
    A) CL-card with ext. board. One can use the ISO, ext. and RS422 encoder inputs and also output cannels ISO and external.
    There is also a SMB connector corresponding to the ext. channel 0.
    B) with MAX one can define what kind of signals should be routed to CC1 to CC4. As I learned from
    this side one cannot use MAX or the Camera File generator but has to do this manually in order to use RS422 encoder triggering!!!
    C) on the other side there exists function to route and control signals explicitely, for example
    * imgSessionLineTrigSource2 -> what is this good for then? All your manuals are saying that this is done in MAX or the camera file by defining what signal drives the correspondung CC ine?? On the other side there is an example in CVI that does not work ("Trigger Each Line From Encoder") (at least it does not work with the PCIe1430).
    D) Can one implement the CC routing from MAX or the camera file manually with the following functions
    * imgSessionLineTrigSource2
    * imgPulseCreate2
    * imgSessionTriggerDrive2
    or does MAX use hidden functions ore mechanism to control the CL Cards?
    E) I can use one single line to setup scaled encoder triggering
    * imgSessionLineTrigSource2(iLS_ZK1_SessionID, IMG_SIGNAL_SCALED_ENCODER, 0, IMG_TRIG_POLAR_ACTIVEH, 0);
    but this only starts to work if I reset the encoder position to zero by sending this to the CL card, i.e.
    * imgEncoderResetPosition(SessionID);
    AND only in positive counting direction!
     If I just run though the zero position without a position reset I do not get ExSync on CC1????
    Is the information where to route the Scaled encoder to coming from the camera file? Why cannot I simply and explicitely route the scaled encoder
    signal to a certain CC line? Why using all those different approaches?
    F) now if in addition to E) i use
    * imgSessionTriggerDrive2(iLS_ZK1_SessionID, IMG_SIGNAL_EXTERNAL, 0, IMG_TRIG_POLAR_ACTIVEH, IMG_TRIG_DRIVE_SCALED_ENCODER);
    to drive ext. 0 (SMB connector) I can see exactly this behavior on the scope. No signal until I reset the encoder counter. Then I get signals as long as the image sequence is running. After the recording the signal disappears.
    kind regards, Holger h.baur(at)ivisso.com

  • How to calibrate Quadrature Encoder signal

    I have PCI-6601 and CB68-LP connector. How can I use these to interpret quadrature signals coming off an optical encoder (to sense the angular position of an-observatory dome). The encoder is 16-bit(don't know what this means in terms of PPR). I want to have a display in Labview that will show me the position of the dome in a fraction of 360 degrees with some reference(true north?), the dome rotation controlled by a three way switch(clockwise-off-anti-clockwise). I don't have much experience with labview and any help will be appreciated.

    If the encoder is 16 bit then it would seem that: -
    360/65536 = 0.0054931640625° or there abouts.
    You can break the project down into two halves nicely.
    1) Hardware interfacing.
    2) Software read out.
    The hardware interfacing means two basic things:
    1.1 What is the encoding technique
    1.2 How are the signals conditioned for output to an external device.
    The software is classic:
    2.1 Input
    2.2 Process
    2.3 Output
    The optical encoder could be one of a few types and you need to understand both the signalling / interface and the coding technique to progress further. A good start will be the manufacturers data sheet for the product. Contact the manufacturer.
    Once you understand the coding technique you will then know if the unit is absolute or relati
    ve. This will then allow you to determine how you can point to true north (easily with an absolute encoder, it always tells you exactly where it is).
    If it is a classic quadrature encoder then the relative phase of the reference and movement signals gives you direction. Counting transitions gives you realtive movement. But if the power went off on the PC. you don't know where you are unless you go to a home position! That could be 359° round !!!
    Good Luck

  • How do I use a quadrature encoder as an external clock (PCI 6229)

    Hello, ( a similar post has been placed on DAQ forum apologies as I did not know best place)
    I have a PCI 6229 M Series data acquisition card. I want to use a quadrature encoder to be the external clock driving the acquisition of a number of signals. I have set up reading 24 signals each time a clock pulse is received using the DAQ assistant and set my external clock to pin pfi8 (I think) this is then connected to an encoder output. This works well enough until the encoder is run too fast when it appears I am either missing pulses or getting bounce.
    How can I set up to clock using a quadrature encoder? I have seen a number of questions on this forum regarding quadrature encoders and reverse counting but not on using them as an external clock.
    Basically I want to have the stability and "bounceless" nature of using two outputs from a quadrature encoder whilst still using an external clock. Is this just a case of configuring controls to certain pfi's? If so how is it done?
    Any help or pointers would be helpful. So far I have managed very nicely by simply using the DAQ assistant and the interface it has would suggest that if configured for a certain pfi pin I could actually still use it.
    Thanks in advance.
    Kevin

    Hi,
    Well I've had alook into this for you and I'm not quite sure I understand what you are looking for.
    Is it possible for you to phone back in to support?
    The reason you are seeing bounce at high speeds, or indeed loss of points, is due to the sampling rate that you have set up.
    What you will find is that the trigger will start an aquisition of a number of points at a certain rate.  If your sampling rate is too low then you will not finish that sample batch before the next set of samples is recorded.
    It is possible to use an external clock into a trigger or digital line, however this will limit the number of samples you can take to the speed of your encoder.
    If you increase your sampling rates, and then configure a start trigger from a single input from the encoder you will be able to record a number of samples after a rising/falling edge.  (Set the clock as an internal clock)
    Hope this helps
    AdamB
    Applications Engineering Team Leader | National Instruments | UK & Ireland

  • ESS Persoanl Data Error(Screen output without connection to user)

    Hi All,
            When i am trying to Save my data in my ESS----->Personal Info -
    >Personal Data, i am getting below error, any body know how to resolve this issue, please let me know.
    Screen output without connection to user., error key: RFC_ERROR_SYSTEM_FAILURE:
    com.sap.tc.webdynpro.modelimpl.dynamicrfc.WDDynamicRFCExecuteException: Screen output without connection to user., error key: RFC_ERROR_SYSTEM_FAILURE
         at com.sap.tc.webdynpro.modelimpl.dynamicrfc.DynamicRFCModelClassExecutable.execute(DynamicRFCModelClassExecutable.java:101)
         at com.sap.xss.per.fc.persinfo.FcPersInfo.save(FcPersInfo.java:440)
         at com.sap.xss.per.fc.persinfo.wdp.InternalFcPersInfo.save(InternalFcPersInfo.java:770)
         at com.sap.xss.per.fc.persinfo.FcPersInfoInterface.save(FcPersInfoInterface.java:186)
         at com.sap.xss.per.fc.persinfo.wdp.InternalFcPersInfoInterface.save(InternalFcPersInfoInterface.java:275)
         at com.sap.xss.per.fc.persinfo.wdp.InternalFcPersInfoInterface$External.save(InternalFcPersInfoInterface.java:435)
         at com.sap.xss.per.vc.reviewnavi.VcPersInfoReviewNavi.onEvent(VcPersInfoReviewNavi.java:213)
         at com.sap.xss.per.vc.reviewnavi.wdp.InternalVcPersInfoReviewNavi.onEvent(InternalVcPersInfoReviewNavi.java:171)
         at com.sap.xss.per.vc.reviewnavi.VcPersInfoReviewNaviInterface.onEvent(VcPersInfoReviewNaviInterface.java:115)
         at com.sap.xss.per.vc.reviewnavi.wdp.InternalVcPersInfoReviewNaviInterface.onEvent(InternalVcPersInfoReviewNaviInterface.java:124)
         at com.sap.xss.per.vc.reviewnavi.wdp.InternalVcPersInfoReviewNaviInterface$External.onEvent(InternalVcPersInfoReviewNaviInterface.java:200)
         at com.sap.pcuigp.xssfpm.wd.FPMComponent.doProcessEvent(FPMComponent.java:533)
         at com.sap.pcuigp.xssfpm.wd.FPMComponent.doEventLoop(FPMComponent.java:437)
         at com.sap.pcuigp.xssfpm.wd.FPMComponent.access$600(FPMComponent.java:78)
         at com.sap.pcuigp.xssfpm.wd.FPMComponent$FPM.raiseSaveEvent(FPMComponent.java:951)
         at com.sap.pcuigp.xssfpm.wd.FPMComponent$FPMProxy.raiseSaveEvent(FPMComponent.java:1114)
         at com.sap.xss.per.vc.reviewnavi.VcPersInfoReviewNavi.next(VcPersInfoReviewNavi.java:227)
         at com.sap.xss.per.vc.reviewnavi.wdp.InternalVcPersInfoReviewNavi.next(InternalVcPersInfoReviewNavi.java:175)
         at com.sap.xss.per.vc.reviewnavi.ReviewNaviView.onActionNext(ReviewNaviView.java:153)
         at com.sap.xss.per.vc.reviewnavi.wdp.InternalReviewNaviView.wdInvokeEventHandler(InternalReviewNaviView.java:173)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
         at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doHandleActionEvent(WindowPhaseModel.java:420)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:132)
         at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:321)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingPortal(ClientSession.java:733)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:668)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
         at com.sap.tc.webdynpro.clientserver.session.core.ApplicationHandle.doProcessing(ApplicationHandle.java:73)
         at com.sap.tc.webdynpro.portal.pb.impl.AbstractApplicationProxy.sendDataAndProcessActionInternal(AbstractApplicationProxy.java:860)
         at com.sap.tc.webdynpro.portal.pb.impl.localwd.LocalApplicationProxy.sendDataAndProcessAction(LocalApplicationProxy.java:77)
         at com.sap.portal.pb.PageBuilder.updateApplications(PageBuilder.java:1299)
         at com.sap.portal.pb.PageBuilder.SendDataAndProcessAction(PageBuilder.java:326)
         at com.sap.portal.pb.PageBuilder$1.doPhase(PageBuilder.java:868)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processPhaseListener(WindowPhaseModel.java:755)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doPortalDispatch(WindowPhaseModel.java:717)
    at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:136)
         at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:321)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
    Caused by: com.sap.aii.proxy.framework.core.BaseProxyException: Screen output without connection to user., error key: RFC_ERROR_SYSTEM_FAILURE
         at com.sap.aii.proxy.framework.core.AbstractProxy.send$(AbstractProxy.java:150)
         at com.sap.xss.per.model.mac.HRXSS_PER_MAC.hrxss_Per_Save(HRXSS_PER_MAC.java:478)
         at com.sap.xss.per.model.mac.Hrxss_Per_Save_Input.doExecute(Hrxss_Per_Save_Input.java:137)
         at com.sap.tc.webdynpro.modelimpl.dynamicrfc.DynamicRFCModelClassExecutable.execute(DynamicRFCModelClassExecutable.java:92)
         ... 64 more
    and after that i went to ST22 Transaction Code in my ECC System i found two types of DUMP errors,
    the below are those details.
    Runtime Errors         OBJECTS_OBJREF_NOT_ASSIGNED_NO
    Exception              CX_SY_REF_IS_INITIAL
    Date and Time          09/09/2008 08:19:16
    Short text
    Access via 'NULL' object reference not possible.
    What happened?
    Error in the ABAP Application Program
    The current ABAP program "SAPLHRXSS_PER_MAC" had to be terminated because it
    has
    come across a statement that unfortunately cannot be executed.
    What can you do?
    Note down which actions and inputs caused the error.
    To process the problem further, contact you SAP system
    administrator.
    Using Transaction ST22 for ABAP Dump Analysis, you can look
    at and manage termination messages, and you can also
    keep them for a long time.
    Error analysis
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not
    caught in
    procedure "HRXSS_PER_CLEANUP" "(FUNCTION)", nor was it propagated by a RAISING
    clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    You attempted to use a 'NULL' object reference (points to 'nothing')
    access a component.
    An object reference must point to an object (an instance of a class)
    before it can be used to access components.
    Either the reference was never set or it was set to 'NULL' using the
    CLEAR statement.
    How to correct the error
    Probably the only way to eliminate the error is to correct the program.
    If the error occures in a non-modified SAP program, you may be able to
    find an interim solution in an SAP Note.
    If you have access to SAP Notes, carry out a search with the following
    keywords:
    "OBJECTS_OBJREF_NOT_ASSIGNED_NO" "CX_SY_REF_IS_INITIAL"
    "SAPLHRXSS_PER_MAC" or "LHRXSS_PER_MACU04"
    "HRXSS_PER_CLEANUP"
    If you cannot solve the problem yourself and want to send an error
    notification to SAP, include the following information:
    1. The description of the current problem (short dump)
    To save the description, choose "System->List->Save->Local File
    (Unconverted)".
    2. Corresponding system log
    Display the system log by calling transaction SM21.
    Restrict the time interval to 10 minutes before and five minutes
    after the short dump. Then choose "System->List->Save->Local File
    (Unconverted)".
    3. If the problem occurs in a problem of your own or a modified SAP
    program: The source code of the program
    In the editor, choose "Utilities->More
    Utilities->Upload/Download->Download".
    4. Details about the conditions under which the error occurred or which
    actions and input led to the error.
    The exception must either be prevented, caught within proedure
    "HRXSS_PER_CLEANUP" "(FUNCTION)", or its possible occurrence must be declared
    in the
    RAISING clause of the procedure.
    To prevent the exception, note the following:
    System environment
    SAP-Release 700
    Application server... "ERPDEV01"
    Network address...... "10.88.1.6"
    Operating system..... "Windows NT"
    Release.............. "5.2"
    Hardware type........ "4x AMD64 Level"
    Character length.... 16 Bits
    Pointer length....... 64 Bits
    Work process number.. 0
    Shortdump setting.... "full"
    Database server... "ERPDEV01"
    Database type..... "MSSQL"
    Database name..... "DE1"
    Database user ID.. "de1"
    Char.set.... "C"
    SAP kernel....... 700
    created (date)... "Oct 23 2007 00:33:51"
    create on........ "NT 5.2 3790 Service Pack 1 x86 MS VC++ 14.00"
    Database version. "SQL_Server_8.00 "
    Patch level. 133
    Patch text.. " "
    Database............. "MSSQL 7.00.699 or higher, MSSQL 8.00.194"
    SAP database version. 700
    Operating system..... "Windows NT 5.0, Windows NT 5.1, Windows NT 5.2, Windows
    NT 6.0"
    Memory consumption
    Roll.... 16192
    EM...... 4189840
    Heap.... 0
    Page.... 0
    MM Used. 1229856
    MM Free. 2957360
    User and Transaction
    Client.............. 210
    User................ 937048
    Language Key........ "E"
    Transaction......... " "
    Transactions ID..... "68211f907e6911ddbfef005056833439"
    Program............. "SAPLHRXSS_PER_MAC"
    Screen.............. "SAPMSSY1 3004"
    Screen Line......... 2
    Information on caller of Remote Function Call (RFC):
    System.............. "########"
    Database Release.... 645
    Kernel Release...... 645
    Connection Type..... "E" (2=R/2, 3=ABAP System, E=Ext., R=Reg. Ext.)
    Call Type........... "synchron and non-transactional (emode 0, imode 0)"
    Inbound TID.........." "
    Inbound Queue Name..." "
    Outbound TID........." "
    Outbound Queue Name.." "
    Client.............. "###"
    User................ "############"
    Transaction......... " "
    Call Program........." "
    Function Module..... "HRXSS_PER_CLEANUP"
    Call Destination.... "<unknown>"
    Source Server....... "ERPDEV04"
    Source IP Address... "10.88.1.9"
    Additional information on RFC logon:
    Trusted Relationship " "
    Logon Return Code... 0
    Trusted Return Code. 0
    Note: For releases < 4.0, information on the RFC caller are often
    only partially available.
    Information on where terminated
    Termination occurred in the ABAP program "SAPLHRXSS_PER_MAC" - in
    "HRXSS_PER_CLEANUP".
    The main program was "SAPMSSY1 ".
    In the source code you have the termination point in line 13
    of the (Include) program "LHRXSS_PER_MACU04".
    The termination is caused because exception "CX_SY_REF_IS_INITIAL" occurred in
    procedure "HRXSS_PER_CLEANUP" "(FUNCTION)", but it was neither handled locally
    nor declared
    in the RAISING clause of its signature.
    The procedure is in program "SAPLHRXSS_PER_MAC "; its source code begins in
    line
    1 of the (Include program "LHRXSS_PER_MACU04 ".
    Source Code Extract
    Line
    SourceCde
    1
    FUNCTION hrxss_per_cleanup.
    2
    3
    ""Local interface:
    4
    *"  EXPORTING
    5
    *"     VALUE(MESSAGES) TYPE  BAPIRETTAB
    6
    7
    8
    CALL METHOD mac_adapter->cleanup
    9
       IMPORTING
    10
         messages = messages.
    11
    12
    TRY.
    >>>>>
    CALL METHOD xss_adapter->cleanup
    14
    15
    CATCH CX_HRPA_VIOLATED_ASSERTION .
    16
    ENDTRY.
    17
    18
    ENDFUNCTION.
    Contents of system fields
    Name
    Val.
    SY-SUBRC
    0
    SY-INDEX
    2
    SY-TABIX
    0
    SY-DBCNT
    0
    SY-FDPOS
    0
    SY-LSIND
    0
    SY-PAGNO
    0
    SY-LINNO
    1
    SY-COLNO
    1
    SY-PFKEY
    SY-UCOMM
    SY-TITLE
    CPIC and RFC Control
    SY-MSGTY
    SY-MSGID
    SY-MSGNO
    000
    SY-MSGV1
    SY-MSGV2
    SY-MSGV3
    SY-MSGV4
    SY-MODNO
    0
    SY-DATUM
    20080909
    SY-UZEIT
    081916
    SY-XPROG
    SAPLHRXSS_PER_MAC
    SY-XFORM
    HRXSS_PER_CLEANUP
    Active Calls/Events
    No.   Ty.          Program                             Include                             Line
    Name
    4 FUNCTION     SAPLHRXSS_PER_MAC                   LHRXSS_PER_MACU04                      13
    HRXSS_PER_CLEANUP
    3 FORM         SAPLHRXSS_PER_MAC                   LHRXSS_PER_MACU04                       1
    HRXSS_PER_CLEANUP
    2 FORM         SAPMSSY1                            SAPMSSY1                               85
    REMOTE_FUNCTION_CALL
    1 MODULE (PBO) SAPMSSY1                            SAPMSSY1                               30
    %_RFC_START
    Chosen variables
    Name
    Val.
    No.       4 Ty.          FUNCTION
    Name  HRXSS_PER_CLEANUP
    MESSAGES
    Table[initial]
    %_DUMMY$$
    2222
    0000
    0000
    0000
    No.       3 Ty.          FORM
    Name  HRXSS_PER_CLEANUP
    SYST-REPID
    SAPLHRXSS_PER_MAC
    5454455555545544422222222222222222222222
    310C82833F052FD1300000000000000000000000
    0000000000000000000000000000000000000000
    0000000000000000000000000000000000000000
    %_%_MESSAGES
    Table[initial]
    No.       2 Ty.          FORM
    Name  REMOTE_FUNCTION_CALL
    %_DUMMY$$
    2222
    0000
    0000
    0000
    SY-REPID
    SAPMSSY1
    5454555322222222222222222222222222222222
    310D339100000000000000000000000000000000
    0000000000000000000000000000000000000000
    0000000000000000000000000000000000000000
    SYST-REPID
    SAPMSSY1
    5454555322222222222222222222222222222222
    310D339100000000000000000000000000000000
    0000000000000000000000000000000000000000
    0000000000000000000000000000000000000000
    HEADER
    000000000000
    000000000000
    TYPE
    3
    0000
    3000
    SY-XPROG
    SAPLHRXSS_PER_MAC
    5454455555545544422222222222222222222222
    310C82833F052FD1300000000000000000000000
    0000000000000000000000000000000000000000
    0000000000000000000000000000000000000000
    RC
    0
    0000
    0000
    SY-XFORM
    HRXSS_PER_CLEANUP
    455555545544444552222222222222
    82833F052F3C51E500000000000000
    000000000000000000000000000000
    000000000000000000000000000000
    %_SPACE
    2
    0
    0
    0
    No.       1 Ty.          MODULE (PBO)
    Name  %_RFC_START
    %_PRINT
    000                                                                                0###
    2222333222222222222222222222222222222222222222222222222222222222222222222222222222222222223000
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    RFCTYPE_INTERNAL
    3
    0000
    3000
    Internal notes
    The termination was triggered in function "method_call_iref"
    of the SAP kernel, in line 2207 of the module
    "//bas/700_REL/src/krn/runt/abmethod.c#8".
    The internal operation just processed is "METH".
    Internal mode was started at 20080909081916.
    Active Calls in SAP Kernel
    Lines of C Stack in Kernel (Structure Differs on Each Platform)
    SAP (R) - R/3(TM) Callstack, Version 1.0
    Copyright (C) SAP AG. All rights reserved.
    Callstack without Exception:
    App       : disp+work.EXE (pid=3864)
    When      : 9/9/2008 8:19:16.162
    Threads   : 2
    Computer Name       : ERPDEV01
    User Name           : SAPServiceDE1
    Number of Processors: 4
    Processor Type: AMD64 Family 15 Model 65 Stepping 2
    Windows Version     : 5.2 Current Build: 3790
    State Dump for Thread Id d90
    FramePtr         ReturnAd         Param#1          Function Name
    0000000007d1bb20 0000000077d704bf 000000003879a800 ntdll!ZwWaitForSingleObject
    0000000007d1bbc0 0000000001722981 0000000000000180 kernel32!WaitForSingleObjectEx
    0000000007d1be10 00000000006110c5 0000000000000001 disp+work!NTDebugProcess [ntstcdbg.c (501)]
    0000000007d1be40 0000000000af8e9c 0000000000000001 disp+work!CTrcStack [dptstack.c (182)]
    0000000007d1be90 0000000000afe0c0 0000000000000001 disp+work!rabax_CStackSave [abrabax.c (7091)]
    0000000007d1c870 000000000081768a 0000000001adae28 disp+work!ab_rabax [abrabax.c (1231)]
    0000000007d1c8d0 0000000000830b12 0000000000000000 disp+work!method_call_iref [abmethod.c (2215)]
    0000000007d1ca50 0000000000a0bac7 0000000000000008 disp+work!ab_extri [abextri.c (554)]
    0000000007d1caa0 0000000000ac830c 0000000000000008 disp+work!ab_xevent [abrunt1.c (281)]
    0000000007d1cb30 000000000066f348 0000000000000008 disp+work!ab_dstep [abdynpro.c (492)]
    0000000007d1ccb0 0000000000672f1d 000007fe571fc890 disp+work!dynpmcal [dymainstp.c (2403)]
    0000000007d1cd40 000000000067291a 000007fe571414a0 disp+work!dynppbo0 [dymainstp.c (543)]
    0000000007d1cdf0 00000000006320d5 0000000000000000 disp+work!dynprctl [dymainstp.c (360)]
    0000000007d1fc30 00000000004d7393 0000000000000003 disp+work!dynpen00 [dymain.c (1629)]
    0000000007d1feb0 000000000042d5a6 000000000a595080 disp+work!TskhLoop [thxxhead.c (4470)]
    0000000007d1fee0 000000000040108d ffffffff00000003 disp+work!DpMain [dpxxdisp.c (1121)]
    0000000007d1ff10 00000000019c7dd1 0000000000000000 disp+work!nlsui_main [thxxanf.c (84)]
    0000000007d1ff70 0000000077d5964c 0000000000000000 disp+work!wmainCRTStartup [crtexe.c (498)]
    0000000007d1ffa0 0000000000000000 00000000019c7c60 kernel32!BaseProcessStart
    State Dump for Thread Id 1e0c
    FramePtr         ReturnAd         Param#1          Function Name
    000000000edffe40 0000000077d5f691 0000000007d86460 ntdll!NtFsControlFile
    000000000edffeb0 00000000018ae00f 0000000000000000 kernel32!ConnectNamedPipe
    000000000edfff40 000007ff7fc411c4 0000000000000000 disp+work!SigIMsgFunc [signt.c (679)]
    000000000edfff70 0000000077d6b6da 0000000077d6b6a0 msvcrt!endthreadex
    000000000edfffa0 0000000000000000 0000000000000000 kernel32!BaseThreadStart
    List of ABAP programs affected
    Index
    Typ
    Program
    Group
    Date
    Time
    Size
    Lang.
    0
    Prg
    SAPMSSY1
    0
    04/11/2005
    09:27:15
    22528
    E
    1
    Prg
    SAPLSYST
    1
    02/13/2005
    17:31:56
    35840
    E
    2
    Prg
    SAPLHRXSS_PER_MAC
    2
    07/03/2008
    12:14:05
    58368
    E
    3
    Prg
    CX_SY_REF_IS_INITIAL==========CP
    3
    07/05/2005
    13:10:16
    10240
    E
    4
    Typ
    SCX_SRCPOS
    0
    05/18/2004
    14:07:11
    2048
    5
    Prg
    CX_DYNAMIC_CHECK==============CP
    5
    07/05/2005
    13:10:16
    10240
    E
    6
    Prg
    CX_ROOT=======================CP
    6
    02/06/2008
    15:43:48
    11264
    E
    7
    Prg
    CX_NO_CHECK===================CP
    7
    07/05/2005
    13:10:16
    10240
    E
    8
    Prg
    CX_SY_NO_HANDLER==============CP
    8
    07/05/2005
    13:10:16
    10240
    E
    9
    Typ
    SYST
    0
    09/09/2004
    14:18:12
    31744
    Directory of Application Tables
    Name                                     Date       Time       Lngth
    Val.
    Program  SAPMSSY1
    SYST                                       /  /       :  :     00004612
    \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x0001\0\0
    ABAP Control Blocks (CONT)
    Index
    Name
    Fl
    PAR0
    PAR1
    PAR2
    PAR3
    PAR4
    PAR5
    PAR6
    Source Code
    Line
    243
    FUNC
    03
    001F
    LHRXSS_PER_MACU03
    1
    244
    PAR2
    02
    0000
    001F
    C000
    LHRXSS_PER_MACU03
    1
    246
    FUNC
    13
    0003
    LHRXSS_PER_MACU03
    1
    247
    PAR2
    01
    0000
    0014
    C001
    LHRXSS_PER_MACU03
    1
    249
    FUNC
    FF
    0000
    LHRXSS_PER_MACU03
    1
    250
    ENDF
    00
    0000
    LHRXSS_PER_MACU03
    1
    251
    00
    0000
    LHRXSS_PER_MACU03
    1
    252
    STCK
    02
    C001
    LHRXSS_PER_MACU03
    1
    253
    CPOP
    00
    0000
    LHRXSS_PER_MACU03
    1
    254
    00
    0000
    LHRXSS_PER_MACU03
    1
    255
    FUNP
    3E
    0000
    0014
    8000
    0000
    8000
    0000
    0000
    LHRXSS_PER_MACU04
    1
    259
    FUNP
    80
    0000
    0000
    0000
    0000
    0000
    0000
    0000
    LHRXSS_PER_MACU04
    1
    >>>>>
    METH
    03
    0000
    0000
    8006
    0000
    0000
    0000
    0000
    LHRXSS_PER_MACU04
    13
    267
    PAR2
    00
    0000
    0001
    0000
    LHRXSS_PER_MACU04
    13
    269
    FUNE
    00
    0000
    LHRXSS_PER_MACU04
    18
    270
    00
    0000
    LHRXSS_PER_MACU04
    18
    271
    PERP
    00
    0000
    LHRXSS_PER_MACU04
    1
    272
    FUNC
    03
    E844
    LHRXSS_PER_MACU04
    1
    273
    FUNC
    03
    0020
    LHRXSS_PER_MACU04
    1
    274
    FUNC
    13
    0003
    LHRXSS_PER_MACU04
    1
    Second Dump
    Runtime Errors         DYNPRO_SEND_IN_BACKGROUND
    Date and Time          09/09/2008 08:19:15
    Short text
    Screen output without connection to user.
    What happened?
    Error in the ABAP Application Program
    The current ABAP program "SAPLSTRD" had to be terminated because it has
    come across a statement that unfortunately cannot be executed.
    What can you do?
    Note down which actions and inputs caused the error.
    To process the problem further, contact you SAP system
    administrator.
    Using Transaction ST22 for ABAP Dump Analysis, you can look
    at and manage termination messages, and you can also
    keep them for a long time.
    Error analysis
    During background processing, the system attempted to send a
    screen to a user.
    Current screen: "SAPLSTRD " 0351.
    How to correct the error
    If the error occurred in your own ABAP program or in an SAP
    program you modified, try to remove the error.
    If the error occures in a non-modified SAP program, you may be able to
    find an interim solution in an SAP Note.
    If you have access to SAP Notes, carry out a search with the following
    keywords:
    "DYNPRO_SEND_IN_BACKGROUND" " "
    "SAPLSTRD" or " "
    "SYSTEM-EXIT"
    If you cannot solve the problem yourself and want to send an error
    notification to SAP, include the following information:
    1. The description of the current problem (short dump)
    To save the description, choose "System->List->Save->Local File
    (Unconverted)".
    2. Corresponding system log
    Display the system log by calling transaction SM21.
    Restrict the time interval to 10 minutes before and five minutes
    after the short dump. Then choose "System->List->Save->Local File
    (Unconverted)".
    3. If the problem occurs in a problem of your own or a modified SAP
    program: The source code of the program
    In the editor, choose "Utilities->More
    Utilities->Upload/Download->Download".
    4. Details about the conditions under which the error occurred or which
    actions and input led to the error.
    System environment
    SAP-Release 700
    Application server... "ERPDEV01"
    Network address...... "10.88.1.6"
    Operating system..... "Windows NT"
    Release.............. "5.2"
    Hardware type........ "4x AMD64 Level"
    Character length.... 16 Bits
    Pointer length....... 64 Bits
    Work process number.. 1
    Shortdump setting.... "full"
    Database server... "ERPDEV01"
    Database type..... "MSSQL"
    Database name..... "DE1"
    Database user ID.. "de1"
    Char.set.... "C"
    SAP kernel....... 700
    created (date)... "Oct 23 2007 00:33:51"
    create on........ "NT 5.2 3790 Service Pack 1 x86 MS VC++ 14.00"
    Database version. "SQL_Server_8.00 "
    Patch level. 133
    Patch text.. " "
    Database............. "MSSQL 7.00.699 or higher, MSSQL 8.00.194"
    SAP database version. 700
    Operating system..... "Windows NT 5.0, Windows NT 5.1, Windows NT 5.2, Windows
    NT 6.0"
    Memory consumption
    Roll.... 16192
    EM...... 12569520
    Heap.... 0
    Page.... 131072
    MM Used. 8307376
    MM Free. 4259072
    User and Transaction
    Client.............. 210
    User................ 937048
    Language Key........ "E"
    Transaction......... " "
    Transactions ID..... "68211f907e6911ddbfef005056833439"
    Program............. "SAPLSTRD"
    Screen.............. "SAPLSTRD 0351"
    Screen Line......... 0
    Information on caller of Remote Function Call (RFC):
    System.............. "########"
    Database Release.... 645
    Kernel Release...... 700
    Connection Type..... "E" (2=R/2, 3=ABAP System, E=Ext., R=Reg. Ext.)
    Call Type........... "synchron and non-transactional (emode 0, imode 0)"
    Inbound TID.........." "
    Inbound Queue Name..." "
    Outbound TID........." "
    Outbound Queue Nam

    Hello Abhiram,
    Please i request weather you have assign 0105 - Communication infotype to ESSuser and
    check the following JCos has been configured.
    SAP_R3_Financials
    SAP_R3_Financials_Metadata
    SAP_R3_HumanResources
    SAP_R3_HumanResources_MetaData
    SAP_R3_SelfServiceGenerics
    SAP_R3_SelfServiceGenerics_MetaData
    SAP_R3_Travel
    SAP_R3_Travel_MetaData
    SAP_R3_SelfServiceGenerics_MetaDataFIN
    SAP_R3_SelfServiceGenericsFIN
    let me know this
    points if problem solved
    please close thread if problem solved
    thanksyou,
    regards
    Vijai

  • Speeding up quadrature encoder read out

    Hi,
    I`m using a quadrature encoder together with a 6259 DAQ Card and BNC2110 Terminal Block.
    I managed to have it working with the DAQ-Assistent at 80Mhz using the Counters and reading one value at a time. Before the DAQ-Assistent I used a DAQmx command to connect PFI10 and PFI9 as the BNC2110 Terminal only outputs PFI0-9. This works but it is really slow, the distance between each measurement point is around 6 us. The VI is in the attachement (AquadB_one_value.vi)
    So I thought I might use the n-values version with the DAQ-Assistent but this does not work and I dont see any reason why, it is complaining about that connection between PFI10 and PFI9 which it didnt do before in the one-value-version. The VI is also in the attachement (AquadB_n_values.vi)
    I also tried another method using a VI I was given some time ago and modified it but here the distance between each measurement point is also around 6us. This VI is also in the attachement (Counter - Read Encoder.vi)
    Or am I missunderstanding something? The minimum achievable time distance between measurement points should be 1/80.000.000 s where of course the value can only differ 1/0/-1 because it has only calculated one new change in the A and B Signals right? I thought with using the n-values it is storing all the calculated values in the memory and I am transferring them afterwards for doing all the "post-processing"?
    If I am wrong, how can I spped up the read-out of the calculated values any other way?
    Best regards
    Attachments:
    AquadB_n_values.vi ‏56 KB
    AquadB_one_value.vi ‏49 KB
    Counter - Read Encoder.vi ‏98 KB

    Hi Dani_munich,
    I just realized that you asked the same question in our Service request. In the service request, I was missing out more information which I found them here by chance . I will further assist you in the SRQ you have created. I also sent you an email.
    Regard
    Anoj
    Anoj Mubarak
    National Instruments

  • RPM Measurement using Quadrature Encoder and PXI 6602 counter

    Hi,
    I am on a project at work where I need to verify the speed (in RPM) of an unloaded motor which can operate up to 1400 rpm.  After doing some research, i determined that a quadrature encoder could be used to make the measurement.  I am looking at this encoder  http://sine.ni.com/nips/cds/view/p/lang/en/nid/205321.
    I have a PXI 6602 counter/timer module in which I would like to interface to the quadrature encoder.  I would like to create a VI that allows me to calculate the speed using the encoder.  Can someone provide me with details of what needs to be in the VI or an example which can do this?  At the most basic level, i want to calculate the speed on demand.  After doing this, i would like to figure out how to quickly calculate the speed so that i can determine response time of the speed changing within sub-millisecond resolution (1 ms resolution max).
    Further, i created a VI that allows me to change the pulse width of a 100 Hz pulse train at run-time which tells the motor controller the desired speed.  I would like to be able to use this VI to change the speed of the motor and the first VI (that I am seeking help about) to calculate the response time (time between the initial speed and settling at the new setpoint).
    I am familiar with the NI example finder, but have not been able to find an example that I can use.
    Thanks,
    Gary

    Hey Gary,
    I think for you setup, you should try using the Meas Dig Frequency - Low Freq 1 ctr. You can find it by searching example finder with 'low freq'. This vi tells you the frequency of a digital signal by sampling between two pulses and inverting the time between pulses. If you hook up your encoder to a counter and have that counter specified in the vi, it will be able to give you on demand readings of frequency (you can do some multiplication to get the rpm value, freq*60/pulses per revolution of encoder). A simple way to take continuous readings is to put a while loop around the daqmx read and the data output of the read. You can also replace the numeric indicator to a waveform chart to graphically display the change of frequency or rpm readings over time.
    You should be able to integrate this as two separate tasks with the pulse train vi you created earlier.
    Hope this helps
    Luke W

  • Quadrature encoder synchronize sample

    Using a USB-6251 to measure a quadrature encoder, i would like to determine the angle that an external discrete changes state.  I tried connecting the discrete to a DIO input and using CVI PC code to read the encoder angle when the change of state occurs.  The problem is the latency of the PC code which adds up to 4 degrees (with variability) to the measured angle.  An ideal solution might be to trigger a measurement into a buffer within the USB-6251 when the discrete changes state, then read the value into the PC at a later time.  Is this possible with the USB-6251?
    Solved!
    Go to Solution.

    Thanks Adam,
    I solved my problem using that idea with the addition of using buffered sampling and the discrete as a trigger.  Committing the task to hardware also seems like a good idea but may not be required.
    The setup code looks like this:
       // Start an Encoder channel on counter 1 to monitor the angle of label detector PNP edges
          status = DAQmxCreateTask("PNP Rising Edges",&pnpTaskHandle);
          strcpy (chanString, devName); 
          strcat (chanString, "/ctr1");
          status = DAQmxCreateCIAngEncoderChan (pnpTaskHandle, chanString, "", DAQmx_Val_X4, 1, 0, DAQmx_Val_AHighBHigh,     
                                                                                  DAQmx_Val_Degrees, 4096, 0.0, "");
          sprintf (chanString, "/");
          strcat (chanString, devName); 
          strcat (chanString, "/PFI1");
          status = DAQmxCfgSampClkTiming (pnpTaskHandle, chanString, 1000000, DAQmx_Val_Rising, DAQmx_Val_ContSamps, 10  
                                          0000);
          if (status < 0)
          DAQmxGetErrorString (status, errString, 1000);
          DAQmxTaskControl (pnpTaskHandle, DAQmx_Val_Task_Commit);
          // Start the task
          status = DAQmxStartTask(pnpTaskHandle);
          angleTaskStarted = 1;
    Reading the value looks like this:
          status = DAQmxReadCounterF64 (npnTaskHandle, DAQmx_Val_Auto, 0, npnEdgeArray, 1000, &npnSampsRead, 0);

  • Quadrature encoder with a non-NI board

    I am attempting use an encoder with a non-NI board (Measurement Computing) and I am unsure how to interface the encoder output from the board with LabView. I have the VIs for the board which allow the board to interface with LabView,. I essentially need a VI to decode the quadrature, the ones in the tutorials were not very helpful or insightful.

    Hello Mystery,
    Take a look at the section “Velocity and Acceleration Calculations” in this devzone.  While the article itself applies to CompactRIO, the equations used in the above section can help you determine how to convert the counter output into a velocity measurement. 
    Does the counter value increase when you rotate the encoder in one direction and decrease when you rotate in the other direction?  This is essentially position measurement.  By knowing the number of ticks per revolution as well as the starting position of the encoder, you can determine the current rotation position.  For velocity, there is a little more to the measurement.  The concept relies on taking a counter measurement in a periodic manner.  Then you can use the number of encoder pulses that have occurred over that period of time to calculate velocity.  The document I linked about shows how to convert the number of encoder pulses over a fixed period of time into RPM which can be later converted into angular velocity.  Hope this helps. 
    Regards,
    Browning G
    FlexRIO R&D

Maybe you are looking for

  • ITunes 7.6.1 Library corruption & possible solution

    For two or three days itunes have been crashing with -50 errors (cannot save the library file) just after trying to play a song after a fresh launch. Otherwise if quitting without playing any music, I would get a dialog upon normal quit which informe

  • After upgrading to iOS 7 on my iPhone 5 recent calls are not showing

    Any ideas on how to solve this problem?? At first it was working fine but suddently all the recent call info dissapeared and you don't know how much you use it until it is gone... As with everything.

  • Issue editing CS3 files in CS5, hangs ID forever, 100% processor

    When opening or modifying CS3 files in CS5, ID will hang forever. Specifically, we have documents that have complex advertiser approval objects on the slug area, many are grouped and have script labels. We have multiple objects on the pasteboard,  ab

  • Script to call a Servlet

    hi all, i have to write a Class that has to call a servlet to upload a file; i was wondering how can i invoke it and which class to use. I have already created and tested the Servlet that upload the file. Any suggestion ? Cheers. Stefano

  • Itunes 8 opens in background

    Ever since this last update to 8, iTunes keeps opening in the background, I've already done a search and the only thread I found doesn't provide a solution. I run Tiger. Thank you.