How do I handle a count overflow while running "end's" rotation drive in position control?

Hi everyone!
We run a direct drive in position control mode and normally do oscillating movements i.e. +-10°. The Signal we get is a TTL with 120 counts/°. And with those counts we do our control.
But now we want to run the motor permanent one direction for some days (or 4 ever :-). That means that we get sooner or later a overflow on the count variable. So I think we have a problem when the setpoint is on Overflow -32767 and the Position is 32767. ( I know that I can increase the Integer Value but that does not solve it at the end :-)
How can I handle that?
Is there any programmatic approach?
Thanks for Help!

Hi Petric,
I do see the math but that does not help when I have more then one overflow, right?
Well, you have to make sure you NEVER miss such an overflow event. It would be a big problem if you would detect just every second overflow…
I got a big issue when the setpoint is jumping due to overflow! I have to handle that primarly.
Have your control loop work with arbitrary units.
Convert your measurement signal to arbitrary unit with handling overflows in this step.
Convert your control output to output signal handling overflows as well…

Similar Messages

  • How do you handle an incoming call while playing a game?

    If you're playing a game on your iPhone, how do you handle an incoming call? A call will stop my app from running, but how do I save the state and restore it when the user starts the app again?
    I have a bunch of objects on-screen and I need to record where they are so that the user doesn't lose the progress of their game.
    I've looked through the SDK, but I can't see anything obvious. Any ideas?

    I don't have a device to test with, but I suspect you'd want to save state in one of the UIApplicationDelegate callbacks:
    applicationWillResignActive:
    applicationWillTerminate:

  • How can we handle an invalid character while doing loading in bi7 ?

    means procedure and details
         issues:
                 i have taken an invalid character in my flatfile
                  and i want to solve this so that i can see these invalid characters in report correctly
    Please search the forum before posting a thread
    Edited by: Pravender on Feb 4, 2012 11:06 AM

    Hi Nihararanjan,
    This issue has been discussed many times, please search in SDN for more threads.
    You go to t.code RSKC and maintain the Invalid or Special characters and then you can load.
    Check the below doc for the same:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0cdc928-5e2d-2e10-e1bb-ec77bcb5cbfd?QuickLink=index&overridelayout=true
    Regards,
    Raghu

  • How to get the concurrent request id while running a concurrent program

    Hi All,
    I am working with oracle apps r12.
    I have created a custom report with some parameter. And i have created a parameter P_CONC_REQUEST_ID.
    And in the report i have used SRW.USER_EXIT('FND SRWEXIT'); in after report and SRW.USER_EXIT ('FND SRWINIT'); in before report trigger.
    when i ran the report from the application, I didnt get the conc request id in the parameter. It not passing the concurrent request id.
    Can any one tell me how to bring the concurrent request id.
    Thanks & regards
    Srikkanth
    Edited by: Srikkanth.M on Mar 14, 2012 1:56 PM

    Hi;
    FND_CONCURRENT_REQUESTS
    This table contains a complete history of all concurrent requests.
    FND_RUN_REQUESTS
    When a user submits a report set, this table stores information about
    the reports in the report set and the parameter values for each report.
    FND_CONC_REQUEST_ARGUMENTS
    This table records arguments passed by the concurrent manager to each program it starts running.
    FND_DUAL
    This table records when requests do not update database tables.
    FND_CONCURRENT_PROCESSES
    This table records information about Oracle Applications and operating system processes.
    FND_CONC_STAT_LIST
    This table collects runtime performance statistics for concurrent requests.
    FND_CONC_STAT_SUMMARY
    This table contains the concurrent program performance statistics generated by the Purge Concurrent Request and/or Manager Data program. The Purge concurrent Request and/or Manager Data program uses the data in FND_CONC_STAT_LIST to compute these
    Also see:
    concurrent request details
    Find history of concurrent request details
    How to determine the user who placed a certain concurrent request?
    Regard
    Helios

  • How to scale objects in a layer while keeping each object in the same position

    I have a map with symbols on it, placed precisely where they need to be. Is there a way to scale all of the objects in a layer or group so that they are larger, but without treating them as a layer that is stretched out to scale proportionately? Basically, how could I make each symbol larger as though each is being scaled from their centers?
    I've tried to select a layer so that each object is selected, then transforming them (specifiying a scale percentage). As a result, the objects are enlarged, but this produces the same results as a normal click and drag from the corner registration point. Any ideas?

    Yes, o.k., sort of. But you are not allowed to select individual objects that are parts of a group or groups. It's also quite all right to select, say, Same Fill Colour and Transform Each will work as long as the selection does not contain parts of groups.
    To my way of thinking it would be better if it worked the other way, with anything selected with the Direct Selection tool, because sometimes you want to transform things even though they are parts of groups. But that's just the way the Illy cookie crumbles.

  • How to make Parameter field not mandatory while running CFL through SAP B1

    Hi Experts.......
    I have a small doubt if anybody can help me.......
    I have created a simple report for testing purpose by taking table OITM and it is diplayng CFL symbol in B1 scressn when I import. Upto this it is working fine and showing correct input.
    Now I made some changes according to my logic is that When I select any value in condition parameter say any Item Group it shows me output for that particular ItemGroup. And when I select nothing in Parameter then it is displaying all data from all the group and this si what I want. But when I import the same CR in SAP and running same report it is not allwoing me to paas Null value so that I can get all the data as output.
    This is giving right result if I dirctly run CR by refreshinh Parameter but same thing I run from SAP and put the parameter field blank it is giving me error that Parameter (ItemGroup) is mandatory
    Can anybody assist me how to solve this?
    Thanks & Regards,
    Rahul Moundekar

    Hi
    I had the same issue.  As noted by Julie SAP published a workaround.
    See my original thread post below.  Go straight to the last entry.
    Crystal in B1 8.8 - optional parameters not working
    The problem is that when called from B1 the hasvalue command always returns true, hence the checking for nulls and spaces etc. as well.
    You keep the parameter definition as Optional.
    This works find for character fields, both single select and ranges, and I have gotten around it for numerics etc by using a SQL formula to cast these to character fields in the data being queried.
    I have yet to be motivated enough to see how to code around this for multi valued fields.
    Hope this helps.
    Rob

  • How to transfer iTunes to new mac while keeping library on external drive?

    I have a new iMac (running 10.4.11). Old mac is a G4 powerbook, which is synched to my ipods and iphone. My iTunes library is on an external hard drive. How do I get the new computer to "own" the iTunes account and media library so it will synch with my devices and not tell me I don't own the music? Thanks!

    Have a look here (click the text after this arrow -> iTunes: Troubleshooting iTunes Store on your computer, iPhone, iPad, or iPod
    I don't understand what you're suggesting at all.
    I'm suggesting you change your signature line to reflect your current computer and current OS so people know what to help with.
    Change what under "my settings"
    Your computer model and your OS version. You list two different computers and 2 different OS versions.
    and and where is "my settings"?
    As stated above, it is here -> My Settings or at the top right side of this window.

  • How do I change maximium heap space while running?

    I cant seem to find out where I would be able to change the maximium heap space while the applet is running can any one help me?

    Hello and welcome to the Sun Java forums.
    It is not possible to set the size of a memory pool, only to [+retrieve+|http://java.sun.com/j2se/1.5.0/docs/api/java/lang/management/MemoryPoolMXBean.html] the usage and maximum size for a memory pool (for instance, the young generation, Eden, survivor space, tenured generation...)
    s

  • How to assign higher priority for labview while running other applications.

    HI,
    I am performing 2 time critical counter operations. I am using software time due to the hardware limitation of PCI6013(I have tried all other options). My problem is that I get a erractic value when I use mouse, keyboard or change to other application.
    I found the following link providing a method to provide maximum priority to labview application.But even regular labview users are asked not to use this application. I am not even a regular LABview user.Is there any precaution that I should take to use this VI. I am in need of such an application very badly. Please Help.
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000F5880000&UCATEGORY_0=_1
    5_&UCATEGORY_S=0&USEARCHCONTEXT_TIER_0=0&USEARCHCONTEXT_TIER_S=0&USEARCHCONTEXT_QUESTION_0=priority&USEARCHCONTEXT_QUESTION_S=0

    "Is there any precaution that I should take to use this VI."
    Yes many,
    When you start to experiment with settings priorities in an attempt to avoid the affects of mouse clicks, then you should brace yourself for the application appearing hung. This would happen if LV had a higher priority than the mouse interupt service routine.
    Same applies to the other conditions you mentioned.
    If you go this route, backup before you experiment! Some strange things can happen to your file system.
    I have talked to you about this challenge of yours in another thread. This is what I recomend.
    1) If you can live with your readings being made on only one gear at a time, AND the sample rate being aperiodic, then you MAY be able to use DAQ Occurances and two session. I
    have not done this myself, and AM NOT SURE if it can be done or if you hardare supports it, but maybe;
    a) Open two references to your and configure A so it uses hardware timing (like you already said works good) to count gear A using the other counter as the gate. On the other session you are counting gear B.
    b) Configure both of the above to fire occurances when done.
    c)Start only session A.
    d) When A occurance fires start B.
    e) When B fires start A, etc.
    This will give you determinism on the counts and effectively shift the indeterminism to the update interval.
    If this is not good enough then there is another option. Can you get yourself a nice solid external reference that you can apply as an external gate to both counters? If so you will be using hardware timing and you should be on the right track.
    If these do not work out, you may end up having to go to different hardware.
    Just trying to help,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How to get Activity Monitor to show processes running on one specific drive

    I clone my main drive to two cloned drives. From the clones I normally, without any problem, run both Repair Disk from the Apple Disk Utility, and a maintenance program from Disk Warrior. Now, however, neither of these utility programs are able to unmount my main drive. Rather, they return a message to quite running processes. I have tried to use Activity Monitor to locate what is running, but can find no way to determine which of the dozens of processes listed are connected to the main drive, rather than to the boot drive of the clone. Plus, I do not understand how something can be "running" on a drive that is not the boot drive. Please help. Thanks.

    Let's start in reverse order...
    I do not understand how something can be "running" on a drive that is not the boot drive
    That's easy. You can't unmount the drive if any files on that drive are in use. That does not necessarily mean the application is stored on that drive, but any file on that drive could prevent it being unmounted - for example, if an application has a document open that is on the drive, you might not be able to unmount the drive.
    Even subtler, if you're running Terminal.app and have cd'd into a directory on that drive, then you won't be able to unmount, either, since the directory is 'in use'.
    As for finding out which applications are using the disk, try lsof in terminal:
    sudo lsof +d /Volumes/diskname
    This will show any process that has an open file handle on /Volumes/diskname (and its subdirectories).

  • Evaluate string while running

    If I want to implement a code as following:
    //String condition = input condtion represent as string (from xml. e.g. 1=1, true, false etc)
    if (condition)
    How do I evaluate the input string while running?

    OR use a Map, where the key is the input String and the value is a Command object. You can avoid the brittle, brain-dead "if/then/else" code that way. If the inputs and commands change frequently, this would be a good way to go that satisfies the open/closed principle nicely.
    %

  • How can we handle browser settings while dealing with the security ?

    Hi ,
    how can we handle browser settings while dealing with the security ?When we configured security in web.xml , during the first request the container is asking for the authentication credentials once they are provided it go's on. but when the user gives a fresh request from the second window within the same browser that time it is not asking for authentication. How can we overcome this.Is there anything to do with server configurations?
    How can we make the container no to keep the things or act like session?

    Ya... I am taking a small example need not happen always but a kind of possibility i am thinking off.
    once the user sign out and just left without closing the browser and a friend (suppose not a good friend ... just kidding...) of that user may open the same jsp or file .This time the security is breached. If that feature or property exists....
    I know what you might say ... the user will log-out before leaving where a programer might invalidate the session at the time of log out.
    Consider the case of a bad Programing or just a programer might forget to invalidate,At that time as a application administrator how can he solve that issue.
    Thanks.......
    Edited by: user8483670 on Jun 6, 2011 1:08 AM
    Edited by: user8483670 on Jun 6, 2011 1:09 AM

  • Documaker : how to change text by count during overflow

    Hi Experts,
    Please help me...
    I want to change a text in a section by overflow count.
    Summary that I have set are as follows.
    1. FormA (contains Subform1)
    2. Subform1 (contains Subform2)
    3. Subform2
    Subform1 on FormA is setting the overflow with the trigger by the XML.
    Search Mask (counter) : !/xxx/data/Repeats/Repeat
    Subform2 on Subform1 is setting that always repeat 3 times.
    Reference :
    Documaker : How to set the overflow repeated 3 times always.
    I created DAL scripts as follows.
    1) To setgvm CTR.
    ---> Section_HEADER on Subform1 has a field that setting this script.
    2) To return GVM(CTR).
    ---> Section_TEXT on Subform2 has a field that setting this script.
    3) To increment GVM(CTR) by 1.
    ---> Section_TEXT on Subform2 has a field that setting this script.
    This counter has been running without any problems.
    I tried to set as follows.
    4) To change text by GVM(CTR)-1.
    if havegvm('ctr',1)
    varctr = gvm('ctr',1)
    if varctr-1 = 1
    return("A")
    else if varctr-1 = 2
    return("B")
    else
    return("C")
    end
    else
    return("")
    end
    ---> I placed a field (call this "OUTPUT_TEXT") that is set this script in Section_TEXT on Subform2.
    This setting is working.
    BUT, I want to output the Double-byte characters at OUTPUT_TEXT field.
    I can not input the Double-byte characters in DAL Script. (If I input, DMStudio was shut down...)
    By placing 3 text areas in Section_TEXT, I thought of setting the trigger switch by count of overflow, but I could not set.
    By count of overflow, is there any other ways to solve this problem?
    Thanks,

    Sorry, I resolved this...
    I created 3 triggers and set it for 3 text area.
    A trigger is as follows for *1* text area.
    if havegvm('ctr',1)
    varctr = gvm('ctr',1)
    if varctr = *1*
    return(1)
    end
    else
    return(1)
    end
    return(0)
    And, I moved the increasing count field to most right position in Section_TEXT.
    +3) To increment GVM(CTR) by 1.+
    ---> Section_TEXT on Subform2 has a field that setting this script.
    It is able to switch text areas by count.
    Thanks,

  • How do I use the counter and digital signals of the 6071E while it is connected to SCXI modules?

    I am contemplating using a PCI 6071E with SCXI. We have the boards (6071E), we would need the cable (I suppose SH1006868) and the SCXI system. I would like to know how would you access the counter and digital line capabilities of the board. I will be using a SCXI-1314 with a SCXI-1520 Module for strain measurements but will need to use the counter and digital lines of the board as well. Can this be done? If so, how and/or what else do I need?

    I think this KnowledgeBase will answer the question for you.
    Accessing DAQ Board Counter Pins with an SCXI System
    Otis
    Training and Certification
    Product Support Engineer
    National Instruments

  • How can I disarm the counter in a specified time?

    I am using 6602 counter. I use 2 counters to perform "Buffered Period Measurement ". I use internal time base (20MHz) as the SOURCE, and wire the signal to the Gate. The counters are triggered by a trigger signal.
    Now I just want to stop counting the signal in a specified time after the counters triggered. After that time, even the input signal is still running,the counting must be stopped. How can I implement this purpose? I don't know how to disarm the counter when the counter are still running, and how to exactly determinate the stop time.
    Thanks for any advise. I have attach my present routine here.
    Attachments:
    counters.vi ‏192 KB

    Just to expand a bit on Justin's answer to outline a few particulars.
    You mentioned using 2 counters to capture buffered periods so I'm assuming that you'll enable triggering to guarantee that they both have the same start time. Note that in this scheme, element #0 of your array of buffered periods will represent the time from the Trigger edge until the first Gate edge.
    Since your description made it sound acceptable to ignore pulse periods occurring later than the interval of interest, perhaps you can collect data for a little longer than necessary, then reset the counters and trim off the periods that came in "too late" using 'Array Subset.' A quick-and-dirty way is to loop over each array of periods, performing a cumulative sum until it exceeds the specified data collection time interval. That'll tell you the length of the subset you need to keep.
    The hard part is that after starting the measurement, you'll need to poll task attributes/properties to determine when the trigger has been received. Only after that's been determined would you start keeping track of approximate time in software.
    There are ways to do the timing in hardware if you get more of the 6602's counters involved. Here's one way:
    1. First configure your 2 counters for buffered period measurement. However, instead of using the internal timebase for a Source, use another counter's output as a Source. Under DAQmx, the internal routing details are handled for you; under traditional NI-DAQ, you'll need to make explicit routing via RTSI.
    Note that in this scheme, these 2 counters don't need to be triggered.
    2. Next, generate a finite-duration pulse train at 20 MHz (examples can be readily found under LabVIEW help or this website). This pulse train should last for your data collection time interval, and will act as the Source signal for your period measurements. It is important that the period-measuring counters are started before the finite pulse train.
    The finite pulse train uses 2 counters -- one to generate the output pulse train at 20 MHz and a "helper" that produces a single pulse whose duration equals your data collection interval time.
    If you need to synchronize to some external trigger signal, you can set the "helper" counter to be triggered, but there'll be one subtle catch. The first period measurement in your buffers will not include the time from the external trigger signal until the beginning of the single "helper" pulse, i.e., the "delay" time spec for the pulse. You can either make this very very short and ignore it, or make it any convenient duration and then add it to the first period measurements. Be careful though: the timebase for this "delay" time isn't necessarily the same as the timebase used to measure periods.
    There's quite a bit of complication there, so let me suggest an easier way that assumes no need to synchronize to an external trigger. (I'll use DAQmx terminology, since the traditional NI-DAQ would get complicated again with explicit RTSI signal routing.)
    A. As describe in #1 above, configure your period-measuring counters to use a 3rd counter's output as the timing source terminal.
    B. After starting your 2 period-measuring counters, start up the 3rd counter to generate a continuous 20 MHz pulse train.
    C. After the 3rd counter starts, call the 'Wait (ms)' function from the Time & Dialog palette. Wait for slightly longer than your desired collection time.
    D. Read all buffered periods from the counters. You may need to first query each to find out how many are waiting to be read.
    E. Reset all 3 counters.
    F. Do the cumulative sum work on the two buffered period arrays to determine where each should be truncated.
    Note that step "C" above will leave you stuck while data is being collected. A small variation would be to read a reference time ("Tick Count (ms)") right after starting your 20 MHz counter, then set up a loop that allows you to terminate early (logical OR of, say, "abort" button, data acq error cluster error, and time comparison). In that loop, you put a delay of maybe 50-200 msec using "Wait (ms)."
    "Wait (ms)" will output a tick count from which you subtract the reference time. When the difference exceeds your data collection time, you can exit the loop and continue with step D above.
    -Kevin P.

Maybe you are looking for