Class that creates classes on the fly?

Hello,
how do I do this:
I want to have a class that produces special .class-files (with different variables, different methods) on the fly (during production).
It should create those files so that they are ready to call (from any other class).
Is this possible?
What would be the best solution to this problem?
Greetings
zuhans

Should you really need it:
http://jakarta.apache.org/bcel/
The Byte Code Engineering Library is intended to give users a convenient possibility to analyze, create, and manipulate (binary) Java class files (those ending with .class). Classes are represented by objects which contain all the symbolic information of the given class: methods, fields and byte code instructions, in particular.
Such objects can be read from an existing file, be transformed by a program (e.g. a class loader at run-time) and dumped to a file again. An even more interesting application is the creation of classes from scratch at run-time.

Similar Messages

  • Defining class on the fly

    Hi,
    Is it possible to have a java program read in a new class from a text file while the program is running and then compile that class file and use it?
    thanks

    inabind wrote:
    thanks. First of all I just wanted to know if it was possible. What I really want to do is define a whole bunch of methods which will act on data depending on the format of that data. So, when the web-app is deployed and running I want a user to be able to dynamically define a class/method to act on their own data. i.e.:
    data = "The brown fox is very cunning"
    method = replace every third letter with capital equivalent.
    now, this is dead easy to do in the 'solid' code but i would like to do it on the fly...Well, how did you, as a person, make that decision? The rules so far aren't clear, but you're probably looking for the Strategy design pattern
    Generating classes on the fly isn't going to be much use. You want to reuse components, not endlessly recreate them

  • Using Class and Constructor to create instances on the fly

    hi,
    i want to be able to create instances of classes as specified by the user of my application. i hold the class names as String objects in a LinkedList, check to see if the named class exists and then try and create an instance of it as follows.
    the problem im having is that the classes i want to create are held in a directory lower down the directory hierarchy than where the i called this code from.
    ie. the classes are held in "eccs/model/behaviours" but the VM looks for them in the eccs directory.
    i cannot move the desired classes to this folder for other reasons and if i try to give the Path name to Class.forName() it will not find them. instead i think it looks for a class called "eccs/model/behaviours/x" in the eccs dir and not navigate to the eccs/model/behaviours dir for the class x.
    any ideas please? heres my code for ye to look at in case im not making any sense:)
    //iterator is the Iterator of the LinkedList that holds all the names of the
    //classes we want to create.
    //while there is another element in the list.
    while(iterator.hasNext())
    //get the name of the class to create from the list.
    String className = (String) iterator.next();
    //check to see if the file exists.
    if(!doesFileExist(className))
    System.out.println("File cannot be found!");
    //breake the loop and move onto the next element in the list.
    continue;
    //create an empty class.
    Class dynamicClass = Class.forName(className);
    //get the default constructor of the class.
    Constructor constructor = dynamicClass.getConstructor(new Class[] {});
    //create an instance of the desired class.
    Behaviour beh = (Behaviour) constructor.newInstance(new Object[] {});
    private boolean doesFileExist(String fileName)
    //append .class to the file name.
    fileName += ".class";
    //get the file.
    File file = new File(fileName);
    //check if it exists.
    if(file.exists())
    return true;
    else
    return false;
    }

    ok ive changed it now to "eccs.model.behaviours" and it seems to work:) many thanks!!!
    by the following you mean that instead of using the method "doesFileExist(fileName)" i just catch the exception and throw it to something like the System.out.println() ?
    Why don't you simply try to call Class.forName() and catch the exception if it doesn't exist? Because as soon as you package up your class files in a jar file (which you should) your approach won't work at all.i dont think il be creating a JAR file as i want the user to be able to create his/her own classes and add them to the directory to be used in the application. is this the correct way to do this??
    again many thanks for ye're help:)

  • Reloading classes on the fly?

    Is there a convenient way to reload changed classes without shutting down and restarting the cluster nodes? I would like to just do cache.clear() then reload the class files and begin populating the cache with the new objects.
    Thanks,
    Andrew

    That depends on how the classes are loaded.
    You probably used the CLASSPATH environment variable to load classes into classpath.
    In this case you have to restart your nodes in order for new classes to be loaded by the JVM.
    To my knowledge, Coherence does not provide any separate classloading features as, for example, an application server does
    where each deployed application gets its own classloader on top of the system classloader defined by CLASSPATH.
    In order to provide this same functionality you have to write a separate classloader that loads the classes of the types
    you load in the cache. In this case the coherence.jar etcetera are in the system classloader (CLASSPATH), while your
    application classes are loaded by a custom classloader.
    ConfigurablePofContext is ClassLoaderAware (http://download.oracle.com/docs/cd/E18686_01/coh.37/e18683/com/tangosol/io/ClassLoaderAware.html)
    From the ConfigurablePofContext API (http://download.oracle.com/docs/cd/E18686_01/coh.37/e18683/com/tangosol/io/pof/ConfigurablePofContext.html):
    "It is conceivable that the ConfigurablePofContext is loaded by the system ClassLoader (or some other relatively global ClassLoader), while the objects
    deserialized by the PofContext are loaded by an application-specific ClassLoader, such as is typical within an application server. The ConfigurablePofContext
    is designed to load the configuration, the POF-able object classes and the PofSerializer classes from within a specified ClassLoader context, and to pass
    the ClassLoader information on to the PofSerializer instances, just in case they are not loaded from within the application's ClassLoader context.
    In other words, the ConfigurablePofContext, its configuration, the PofSerializer classes and the POF-able classes can all be loaded by the same ClassLoader,
    or they can all be loaded by different ClassLoaders, so long as the configuration, the POF-able classes and the PofSerializer classes can be loaded by either
    the specified ClassLoader or by the ClassLoader that loaded the ConfigurablePofContext itself."
    The problem is (with most classloading) how to unload the classes that are referenced in a runtime environment. This usually means, in the case of an
    application server, to delete a certain deployment and redeploy again.
    Hope it makes a little sense.
    An example of a custom classloader and same more background on classloading can be found here: http://middlewaremagic.com/weblogic/?p=6725

  • Creating buttons on the fly and setting button properties

    If I have a view and want to add buttons to it "on the fly" from values in an array, is that something straightforward to do?
    I have an array of UIImageVIew objects and would like to create buttons from them (showing the image on the buttons) and associate those buttons with a method in my implementation file. That would be a lot more general and flexible than creating the buttons in the Interface Builder I would imagine.
    And one more question - can I freely set button properties while doing that? Or in Objective-C can I only set properties that are already pre-defined for that class?
    Thanks!
    doug

    Thanks for your reply.
    That.... works! Thanks!
    And I can generate the button and click on it and it calls my other method and that works too. Cool!
    The syntax is still very mysterious to me, but I suppose eventually I'll understand what it all means.
    Breaking it down to see what it means:
    [button1 addTarget:self action:@selector(selectedHandler1:) forControlEvents:UIControlEventTouchUpInside];
    * button1 is the object I created (I'm going to try to do this in a loop next.)
    * addTarget is a message I am sending to button1 and the content of the message is "self", which refers to - this button? I'm not sure why such a message would be necessary.
    * action is another message sent to button1 and the contents of that message are a little harder to parse. I see the result, and can mimic the syntax now that I've seen it, but I don't really understand what the @ is for, or the : after the method name or why this wouldn't just be "action: selectedHandler". I'm sure the language designers have a logical reason for all that, but I don't quite "grok" those extra symbols yet.
    * forControlEvents is another message sent to button1 and the event message itself is clear in its meaning.
    Anyway, that is working and I can refer more to the UIButton class reference now and try to set more stuff, like position it better, etc.
    Thanks very much!
    doug

  • Creating relation on the fly... How?

    Hi All,
    I have 2 block, but there is not relations.
    Block 1 : Based on Table1.
    Block 2 : Based on Table2.
    I have to create the relationship between the blocks on the fly as per requirements. (Like master detail relation ship).
    How can i fulfill this run time?
    Subir

    You could do it by fooling forms into doing what you want.
    Add the following column to each table:
    FORMS_X CHAR(1) default 'X'
    Join these tables as Master-Detail using the wizard on this dummy column, which will create all the required relations and triggers. Then use the order_by clause (set_block_property) to dynamically join the blocks together by the required column(s).
    The query will be something like ...where :master.forms_x = :detail.forms_x and <whatever else you like>...
    I've used this method to do 'fuzzy' data matching between 2 tables containing name and address data - so, I'll have:
    where :master.forms_x = :detail.forms_x and :master.postcode = :detail.postcode
    or
    where :master.forms_x = :detail.forms_x and :master.company_name = :detail.compamy_name

  • Creating the class on the fly.

    Hi all,
    I want to create a class not an instance on runtime. Is there any way to create a class on runtime and then get its intance?
    Rana.

    As I see it you'll need to create and compile a .java file it in runtime. Getting an instance can be then done through reflection.
    The class java.lang.Compiler may prove useful.
    You can use the sun's javac for getting started but you can't distribute it. IBM has an open source java compiler: http://oss.software.ibm.com/developerworks/opensource/jikes/
    Creating a new instance of a class: Class.forName("full.class.Name").newInstance() (assuming you have a no-arg constructor)

  • Overriding classes on the fly

    Hello everyone!
    Sorry for the vague title, as I don't know quite how to name the following example of code:
    AbstractClass concreteObject = new AbstractClass( a, b ) {
                public void previouslyAbstractMethod (Object parameter) {
                    doSomethingWith( parameter );
            };My question is this: if I wanted to pass a local variable into my newly overridden and substantiated class object, is it impossible to create a new constructor in my override? For example:
    AbstractClass concreteObject = new AbstractClass( a, b, c ) {
                public AbstractClass( A a, B b, C c ) {
                    super( a, b );
                    doSomethingSpecial( c );
                public void previouslyAbstractMethod (Object parameter) {
                    doSomethingWith( parameter );
            };Or do I have to live with the kind of mess I've been using as below:
    AbstractClass concreteObject = new AbstractClass( a, b ) {
                public AbstractClass returnMeButAlsoDoSomething( C c ) {
                    doSomethingSpecial( c );
                    return this;
                public void previouslyAbstractMethod (Object parameter) {
                    doSomethingWith( parameter );
            }.returnMeButAlsoDoSomething( c );It all seems a little messy to me (yeah yeah I know I should be creating separate classes for these kinds of arrangements, but when you have lots... creating single-object classes this way is so convenient!)
    Appreciate the help!
    Weasel.

    My main use of this code is to pass in an extra
    parameter for an event handler to use (normally the
    parent object so I can run a method)... I suppose I
    could start registering the parent as the event
    handler, but there may be alot of event spawners to
    register it with.
    Implement the handler as an interface and return the appropriate type via the Factory pattern.
    I'm definitely loathe to create named classes for
    these objects when all I'm doing is passing a
    parameter in and overriding a single and simple
    method.
    Not all objects are huge. In fact, some of the most useful are the smallest. I try to keep any object to a dozen methods or less, and any method to no more than screen-size in my IDE. Large classes should usually be refactored into smaller ones. I have never heard of a class that is 'too small', as long as it is doing something useful.
    I'm probably alone on this point, but I like the feel
    of anonymous classes taking parameters more than have
    a ton of 'if then else if's in the event catcher!
    If you have real objects, polymorphism will take care of this for you, and you will have cleaner, shorter code in your objects.
    Thinking about it, I'm almost certain I'm alone in
    this :o) In fact, I'd consider myself a bit odd!No worries. If it runs and works, it's valid. Might not be maintainable, but still would be valid.
    - Saish

  • Compiling new classes on the fly without having a .java file

    Hi everybody,
    I'd like to compile dynamically produced JAVA code (code from user input in my application). I don't wanna store the source code in a .java file, but just compile the code (as char[] or something like that) to a byte[].
    Does anybody have an idea ??
    Thanks
    Jan

    Have you looked at the idea of interpreting rather than compiling, say using Jython (a python interpreter written in Java). Python and Java are extremely close in syntax, and it should be relatively easy to do what you are talking about.
    I am worried though, that you are going to let users type in text, and assume that it has valid syntax in the language you are using. Many years of UI experience indicate that letting users type in anything results in a certain error rate. Letting it be instructions you are to follow in your code is even more dangerous.
    There are many programs that let users define actions interactively. They seem to either let the user type in text, and error check it to death (a lot of work, think spreadsheet type programs), or they present the user with a set of choices, often using a wizard type interface, which takes more up front UI work, but only lets the users select valid options.
    It sounds like you want to interpret what the user types in as instructions. Even with Jython (or a similar interpreter), you would need to parse the user input for formatting errors, invalid variable names, and anything else they could make a mistake on, before you could pass any of it to the interpreter.
    Good luck.

  • BW Report iView - Buttons to create graphs on the fly

    I once created a BW report through the portal and it had buttons at the top so once I had filtered my query the way I wanted it I could click the graph button at the top of the screen and automatically graph it.  That was very cool!  Now I can't remember how I got that option to appear?  There was a whole row of icons at the top of the screen, for example one was a pie graph, one was a bar graph, one was an Excel icon, one was CSV I think...
    How do I get those to appear?  I used Web Application Designer and then referenced it via the portal iView.  I don't see the option for the toolbar anywhere and I'm baffled how I did it before.

    add the following lines of code to your webtemplate.
    <table  align=right  cellspacing="1"  bordercolor="#111111"  id="AutoNumber1" style="border-collapse: collapse">
          <tr>
           <td  >
    <A href="#Navbar">
    <IMG title=<SAP_BW_TEXT program='SAPLRRSV' key='742'> alt="<SAP_BW_TEXT program='SAPLRRSV' key='742'>" src="/sap/bw/Mime/BEx/Icons/pixel.gif" border=0 ></A>
    <A  href="<SAP_BW_URL ITEM='*GR*' MULTI='X' HIDDEN='X' CMD_1='ITEM=*GR1*&MULTI=X&HIDDEN=''>"><IMG alt="<SAP_BW_TEXT program="SAPLRRSV" key="622">" src="Mime/BEx/Icons/S_B_TVAR.gif" border=0></A></td>
    <td  > |</td>
    <!-- Display Bar Chart--->
    <td  >
    <A href="<SAP_BW_URL ITEM='*GR*' MULTI='X' HIDDEN='X' CMD_1='ITEM=GR1GR2NavBlock&HIDDEN=' CMD_2='CMD=RESET_ITEM&ITEM=GR2Chart&WIDTH=600&HEIGHT=400&HIDDEN=&ITEM_ID=0QUERY_TEMPLATE_COLUMNSTACKED&GENERATE_CAPTION='>">
    <IMG alt="<SAP_BW_TEXT program="SAPLRRSV" key="657">" src="Mime/BEx/Icons/S_GISBAR.gif" border=0>
    </A>
    </td>
    <!-- Display Pie Chart--->
    <td  >
    <A href="<SAP_BW_URL ITEM='*GR*' MULTI='X' HIDDEN='X' CMD_1='ITEM=GR1GR2NavBlock&HIDDEN=' CMD_2='CMD=RESET_ITEM&ITEM=GR2Chart&WIDTH=600&HEIGHT=400&HIDDEN=&ITEM_ID=0QUERY_TEMPLATE_PIES&GENERATE_CAPTION='>">
    <IMG alt="<SAP_BW_TEXT program="SAPLRRSV" key="658">" src="Mime/BEx/Icons/S_GISPIE.gif" border=0>
    </A>
    </td>
    <!-- Display Line Chart--->
    <td  >
    <A href="<SAP_BW_URL ITEM='*GR*' MULTI='X' HIDDEN='X' CMD_1='ITEM=GR1GR2NavBlock&HIDDEN=' CMD_2='CMD=RESET_ITEM&ITEM=GR2Chart&WIDTH=600&HEIGHT=400&HIDDEN=&ITEM_ID=0QUERY_TEMPLATE_LINES&GENERATE_CAPTION='>">
    <IMG alt="<SAP_BW_TEXT program="SAPLRRSV" key="659">" src="Mime/BEx/Icons/lines.gif" border=0></A>
    </td>
    <!-- Display 3D Bar Chart--->
    <td  >
    <A href="<SAP_BW_URL ITEM='*GR*' MULTI='X' HIDDEN='X' CMD_1='ITEM=GR1GR2NavBlock&HIDDEN=' CMD_2='CMD=RESET_ITEM&ITEM=GR2Chart&WIDTH=600&HEIGHT=400&HIDDEN=&ITEM_ID=0QUERY_TEMPLATE_3DCOLUMNS&GENERATE_CAPTION='>">
    <IMG alt="<SAP_BW_TEXT program="SAPLRRSV" key="660">" src="Mime/BEx/Icons/columns_3D.gif" border=0></A>
    </td>
    <td  > |</td>
    <!-- Display Export Excel--->
    <td  >
    <A  href="<SAP_BW_URL CMD='EXPORT' FORMAT='XLS' DATA_PROVIDER='DP' SUPPRESS_REPETITION_TEXTS=' '>">
    <IMG alt="<SAP_BW_TEXT program="SAPLRRSV" key="T77"> <SAP_BW_TEXT program="SAPLRRSV" key="T72">" src="Mime/BEx/Icons/S_X_XLS.gif" border=0 ></A>
    </td>
          </tr>
        </table>
    Regards
    Raja

  • Best way to create samples on the fly in sample editor

    If I highlight part of a region in the sample editor and want to make a copy of it to use as a sample in EXS24, what's the best way to make that copy so that the plugin effects applied to that larger track are present on the copy. I find that it I just create a copy of the highlighted section, the copy is made with none of the plugin effects applied to it, just the raw sound with no effects applied. I just want to quickly be able to make a copy of a selection in the sample editor and have the resulting copy essentially be a bounce of the sample with effects applied in the resulting file. Possible?
    whew,had a hard time wording that one

    hi
    can't do that in the sample editor - if your files had all the effects bounced down into them already then you could....
    go to the arrange, select your region, solo it and select file>bounce.
    If you don't wanna record automation you could put your regions on a separate tracks and select file>export all tracks...
    rounik

  • Create on-the-fly menu in JSC 2

    Hi everyone,
    How to create an on-the-fly menu in JSC 2? the on-the-fly menu is something like the menu bar on this Sun Developer Netowork page. When you move a mouse over a link such as APIs, Downloads, and Technologies, there is a menu shown up.
    A sample code would be perfect.
    Thanks in advance,

    The Sun Developer Network page uses javascript to display on-the-fly menus.
    Browsers usually provide ways to view the source code of any HTML page. The instructions to view them will of course vary for different browsers. For mozilla1.4, You can do 'View | Page Source' to see which javascripts are used. You can also select the 'View | Page Info' menuitem, select the 'Privacy' tab and expand 'Scripts' to get the URLs of the scripts used in that page.
    The menucode used in Sun Developer Network page is http://forum.sun.com/jive/js/menucode.js.
    The following are the resources suggested by mozilla.org for javascript:
    http://www.mozilla.org/js/
    http://www.mozilla.org/js/scripting/
    You can of course obtain a lot of free javascripts from the web; for dynamic menus you might want to check out 'http://www.softcomplex.com/products/tigra_menu/'

  • Creating on the fly dynamic named bind variable names.

    I have an application process which gets called by a Dynamic action and Javascript.
    Everything is working great however I'm using it to drive dynamic charts.
    I could use IF statements at the end of the application process to decide what BIND vairable to fill with the information the process has collected however I'd prefer just to create the BIND variable from the
    name of the submitted information.
    So I have an application level variable called WHICHCHART. this gets populated with text upon calling the application process...so let's say 'chart1' is what it gets filled with.
    What I"d like to have at the end of the application process is just a bind variable waiting called :chart_1.
    So no matter what the value of WHICHCHART it will create an on the fly a bind variable with the same name.

    Ok. I guess this question was more how do you do this..then OH NO there are not other ways to do this.
    So I have a page with a chart region. this chart will have 3 Y Axes which prohibits the use of the default XML.
    So..
    I have the following Javscript:
    function getdata(whichchart) {
      var get = new htmldb_Get(null,$x('pFlowId').value,'APPLICATION_PROCESS=VM_XML_GENERATION',0);
            get.add('WHICHCHART',whichchart);
            gReturn = get.get('XML');
      get = null;
    Which is called when the page loads by a dynamic action:
    getdata('production');
    When the javascript is called as you can see it fires off:
    declare
       chart_series_data VARCHAR(32767);
       type array_cols is varray(7) of varchar2(100);
       array array_cols := array_cols('VM_HOSTS_NUM','VM_NUMBER','VM_PHYS_MEM','VM_VIRT_MEM','VM_CPU_COUNT', 'VM_TOTAL_DISK','VM_PROVISIONED_DISK');
    BEGIN
    --IF :WHICHCHART IS NULL THEN
    --RAISE_APPLICATION_ERROR(-20001,'Chart variable not set');
    --END IF;
    chart_series_data := null;
    chart_series_data := '      <data>'||chr(10);
    chart_series_data := chart_series_data||  '        <series name="Hosts Number" type="Line" color="0x1D8BD1" >'||chr(10);
    for c1 in (SELECT VM_REPORT_DATE LABEL,VM_HOSTS_NUM from TABLE where VM_REPORT_DATE between add_months(SYSDATE,-24) and SYSDATE and lower(VM_DCNAME)=lower(:WHICHCHART) )
    loop
    chart_series_data := chart_series_data || '<point name="'||c1.LABEL||'" ';
    chart_series_data := chart_series_data || 'y="'||c1.VM_HOSTS_NUM||'"></point> '||chr(10);
    end loop;
    chart_series_data := chart_series_data|| '      </series>'||chr(10)||'</data>';
    :PROD_DATA := chart_series_data;
    END;
    The : production variable at the end of this I want to change the name of based on the value I'm sending of WHICHCHART from the javascript. I hope this is clearer now.
    AGAIN this is not really a need. It is a want to be able to create dynamic bind variable names going forward.
    Thanks

  • BeforeRenderResponse() error with on-the-fly components

    Why this solution doesn't works when I'm creating one on-the-fly components?
    * Constructor method
    public menu()  {
            beforeRenderResponse();
    public void beforeRenderResponse(){
    ... some code creating one on-the-fly component
    }It works very well when i have other kind of code.
    This is the error:
    Exception Details: org.apache.jasper.JasperException
    javax.servlet.jsp.JspException: Duplicate component ID 'form1:rbg0' found in view.
    If I put the on-the-fly code right inside constructor method, it works... but I need to "remake" the component all the times that the page is refreshed.

    If I am understanding you right, the error you are seeing is basically saying that the component (with ID rbg0) already exists so it won't let you create it again. Is your beforeRender reponse getting called multiple times?
    Lark

  • Adjust Counter Delay on the fly using two Counters

    Hi,
    I'm using the technique described here by JohnP to implement an on the fly delayed output of a hardware counter relative to it's trigger.
    http://forums.ni.com/t5/Multifunction-DAQ/Synching-AO-and-Counter-Output-arming-and-triggering-seque...
    My system generates a hardware buffered regenerative analog output.  A continuous synch pulse is generated using Cntr0 on the same PCI-6221 and is triggered off of the AO.StartTrigger in order to synchronize the Cntr0 Pulse with each generation of the AO wavefrom.  Then Cntr1 is configured in retriggerable single sample high/low time mode and triggered off of the Cntr0.InternalOuput.  By changing the low time of Cntr1 I can effectively implement an adjustable on the fly delay on the ouput of Cntr1 relative to Cntr0 and hence relative to the AO waveform.
    The technique works great for rational values of drive period, (i.e.  1.258 s), but when an irrational waveform period is commanded such as (0.59405940594059405940594059405941 s) the Cntr1 delayed pulse drifts relative to Cntr0.  Meaning if you start with a 0 second delay between the two counters, the output pulses are initially aligned but then Cntr1's output will rapidly drift such that the two counter outputs are no longer synchronized.
    Clearly there is a rounding error occuring but I can't seem to correct it.  I changed the Cntr1 high/low mode from time in seconds to clock ticks thinking I'd have better resolution but still see the same drift with irrational drive periods.  I also suspect that by calling the Cntr1 property Cntr.RdyForNewVal in a loop the hardware determinism of my system is compromised.
    Our current solution is to simply coherce the user commanded AO drive period to rational values.
    I'm mainly wondering if this problem can be corrected or if it's just a limitation of the method using two counters to create an on the fly counter output delay.
    Thanks,
    Steve

    John,
    I'm measuring the drift of the output signals (AO and Cntr1) on a daq board scanning at 5000 scans/s.
    The information you provided is helpful, I wasn't aware of the divide-down on the internal timebases.  Yes, I am specifying the frequency directly to Cntr0 so this may be coerced differently than the AO. 
    Where does one find these specifics on the board and various clocks?
    I've attached some sample code that may be of help to future users of this technique.  The sample code outputs a continuous regenerative buffered Analog Output waveform (board hardware timed).  Cntr1 is then configured in Frequency mode and triggers off of the AO.StartTrigger in order to synch the two signals.  Then Cntr1 is configured in High/Low mode and triggered off of the Cntr0.InternalOutput.  By changing the Cntr1 low time, I'm able to get an on the fly delayed output of Cntr1 relative to Cntr0 and hence the AO.
    If you have a daq board and you wire the AO and Cntr1 output signals into two analog input signals, you can see the drift when using irrational frequencies.  The sample code I provided only performs the output, so to see the signals you can simply create a continuous acquisition task in Max at 5Khz.
    Thanks for you time and support.
    Attachments:
    Delayed Counter Pulse.zip ‏137 KB

Maybe you are looking for

  • How do I use iCloud to backup my  POP Mail

    how do I backup mail that uses POP Mail? When I go to my  iCloud and check my backup apps. I can not find the option to add my Mail that is configured for POP. I just have the option for the mail function of me.com Thank you ahead for all replies. Ro

  • Changing file name dynamically in INFOSPOKE

    Hi All, I am using infospoke to export data to third party. But here file name is constant. I want to change the file name using prefix with time stamp before filename. For example if data is getting extracted today and file name is suppose ABC then

  • ISA Server 2006 + Average response time for Non Cached requests = performance issues?!?!?!

    All, I am in a predicament with internet browsing speeds...We have a 3rd party look after our line and internet facing f/w  so I cant troubleshoot them, so at the moment Im looking at ISA as the potential bottleneck - we have a fairly standard enviro

  • Incorrect colors when drawing an image

    Hello! I use Java 5 update 4 and Windows XP in 16-bit color depth mode. I run the following code: BufferedImage in=ImageIO.read(<A_JPG_FILE>); BufferedImage im=GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfi

  • Me account won't verify

    Please can someone help? I backed up my new 5S and my me account won't verify because its showing an old business email account. I have changed my email address and verified via my MacBook Air but, my phone is still showing and asking for the old ema