Page 5 of 7 FirstFirst 1234567 LastLast
Results 41 to 50 of 67

Thread: Exporting completed laser shows to other software - PROBLEM!

  1. #41
    Join Date
    Jan 2005
    Location
    Norway
    Posts
    1,303

    Default

    I dont think you should have that e-mail adress open like that !
    As I now think buffo got it, you can remove it to prevent spam

    As peter says he NOT got the time to be on forums so I dont think he need to many e-mails that`s why I share what he says here..

  2. #42
    Join Date
    Jan 2006
    Location
    Charleston, SC
    Posts
    2,147,489,459

    Default

    Oh, OK... That's the same address that they have listed on the website for him - under software support. I thought you had another address for him. I guess I'll use that one and see if he replies. (I figured it would take quit a while to get an answer via the software support address, but maybe he answers that mail pretty fast...)

    Still, no biggie. I'll send him a message and see what he says. Thanks for the tip though. (And if you want to edit your message Jimbo, you can - though it's probably not going to matter a lot since his address is already posted on the web...)

    Adam

  3. #43
    Join Date
    Aug 2006
    Location
    North West England
    Posts
    1,148

    Default

    I've removed it anyhow.
    He responded straight away (within the hour) when I contacted him, that is exceptionally good customer support

    Jim

  4. #44
    Join Date
    Jan 2006
    Location
    Charleston, SC
    Posts
    2,147,489,459

    Default

    Well, I sent him a message about my ideas for Mamba... We'll see what he says about it.

    Also, regarding this 50 second clip that we've been playing with, trying to get Mamba to export to ILDA... Fred got the clip to play correctly on his RGB system, so he shot some video of the clip as it played and digitized it.

    Unfortunately, the clip plays at 25 frames per second and the camera runs at 30 frames per second, so there is some flickering in the image because of the mis-matched frame rates. Still, it doesn't look all that bad for something that was slapped together rather quickly.

    If you'd like to take a look at it, I've uploaded the video to the FTP server. It's in the main directory. The file name is "50secondsofHITthat.zip" The zipped file is just over 11 megs...

    Adam

  5. #45
    Join Date
    Aug 2006
    Location
    North West England
    Posts
    1,148

    Default

    Adam, I still haven't got the details for the FTP

    Jim

  6. #46
    Join Date
    Jan 2006
    Location
    Charleston, SC
    Posts
    2,147,489,459

    Default

    Jimbo:

    Check your PM's... I think Thomas sent you one on Monday. (I just sent you one as well)


    Adam

  7. #47
    Join Date
    Jan 2006
    Location
    Charleston, SC
    Posts
    2,147,489,459

    Default

    Wow! Peter has already sent me a reply to my e-mail from yesterday... (15 hour turn-around time!) That's pretty awesome customer service.

    He pointed out a few things in Mamba that I missed the first time through, and he suggested a few work-arounds for the lack of a dedicated abstract generator. (Such as using a simple shape like a circle or a square and then applying several rotation and move effects to the frame at the same time.)

    He did say that it was unlikely that Mamba would ever have a pattern generator, because of the problems converting between a continuously changing output (from the pattern generator) and the rigid timing of the frame buffer on the DAC. He also pointed out that the full version of Pangolin has an abstract generator right on the card, and to add that feature to a much cheaper software product would undercut their Pangolin sales.

    All in all, though, it was a detailed, informative e-mail. I'm impressed!

    Adam

  8. #48
    Join Date
    Jun 2005
    Location
    SoCal
    Posts
    508

    Default

    Hi ya'll... yes I'm sort of back... I took a break from the whole internet thing to
    work on our own projects. Sometime soon I'll share a few new things.
    I'm still swamped so my updates and hanging out will be sporadic until
    we get some things under control.

    This is going to be a somewhat technical post so bear with me.

    In terms of software oscillators and maintaining timing through
    the parallel port, it's actually pretty trivial under linux, and almost as
    trivial under windows. Now keep in mind we are NOT talking about
    real-time extensions/kernel mods, that'd be cheating (or specically
    the CORRECT solution, depending on who you talk to).

    For example, both the "butterfly" and the "flower" samples are done
    using an parallel port based 8-bit board I hand-wired for tinyness.
    The 8-bit board is uber-small so I carry it around with me along with
    a mini 1.5" oscilloscope when I want to work on shows discreetly at
    coffee shops and truck stops, etc.


    http://scc.sc.wfinet.com/howdy/kson_butter.AVI


    http://scc.sc.wfinet.com/howdy/kson_abstract.AVI

    The first step is to visualize the upper and lower boundaries.

    First we'll settle on a scanspeed. In Pangolin, you generally do
    abstracts at 8 or 12kpps to avoid stressing the scanners JIC the
    internal "math" suggests an aggressive sweep. If you're using
    a pattern which you're confident about, 18k is acceptable. I'd
    avoid running at 30k on abstracts since you'll almost definitely run into
    compression issues if you have a large scanangle (as I generally do)

    In either event, we will assume the worst case scenario of 30kpps.
    This gives you the programmer 33us to display the next point.
    Now if you note that we're feeding the points through the parallel port
    so sending each byte will cause a 1us block because of the ISA standard
    (unless we're running in EPP or ECP mode, which we'll ignore since
    microsoft effectively killed EPP, and ECP can actually hurt our perfomance
    because of the small blocksize) When you're sending X Y and say RGB,
    that's 5 bytes of data and at least 5 bytes of control. (remember we're
    doing worst case, so optimizing these numbers isn't what we want)
    Now following true parallel port standard, after each write you normally
    need a inb(0x80) to place a 1us hold rate, but since we send a status
    after each byte to trigger, you can almost always skip it for this application.

    So... 10 bytes transfered = 10us.

    That leaves 23us to work with... In normal (non-loaded) operation has
    a 1-2us jitter (measured emprically) of the very high resolution timers
    on a standard 2Ghz system... on a 700Mhz system you will see 2-3us of
    jitter. An interesting note is that the actual jitter on all the machines
    (barring interrupt servicing which we'll talk about later) we tested is
    withing 2us of the lower bound! In either event, we'll just use an
    unlikely high number of say 10us... Now if you read the kernel notes
    or all established documentation, you'll see their timing as 10us to 50us.
    This is just not true, and is more of an average also taking into account
    the gross pauses due to the system interrupts to make sure new
    programmers do not make timing dependancies based on the
    expectation of fast servicing.

    In conclusion, this leaves us 13us for the math. Before I talk more,
    I'll go on a tangent.

    The key reason most people give for not being able to do effects or
    math on a parallel port based system is the servicing of interrupts.
    (This is generally shown as hot spots when you move your mouse or
    in the extreme example a 1-2 second pause if you close the top of your
    Dell laptop :evil: ) The important thing to realize is that if your system
    is going to service an interrupt, it doesn't matter what it's doing, it's
    going to pause anyways! An extra 13us will be unnoticable.

    The real reason they see unacceptable delays when trying to do more
    than just simple playback is because of the method they use for timing.

    The first code most people use is...
    Code:
    usleep(10); // theoretically 10us of delay, but more like 20us as there is
                          // usually a 10-20us latency in servicing.
    The reason this is "bad" is because if it takes say 30us to (for what should
    have been 10us) then you get some bad hotspotting... And the more CPU you
    take for math, the worse it gets... The built-in sleep commands on all
    major OSes are not suitable for high-resolution timing purposes.

    The more advanced way of writing the above is...
    Code:
    for &#40;int i=0; i<10; i++&#41; &#123;    // delay for 10us
        inb&#40;0x80&#41;;                     // a generally agreed "safe" address to read from.
                                               // A read operation on a low IO address will cause
                                               // a very close to 1us delay.
    &#125;
    Both ways "work", and the second works better, but still requires manual
    timing and tuning to get the "magic" numbers and these numbers have to
    be tweaked from system to system for optimal operation.
    Since the functions are "stupid" in the sense that they don't base off an
    external clock, they will also add the problem of desynchronization if you
    have two systems running next to each other. (i.e. wiggle the mouse on
    one box and leave the other running... the one servicing the mouse will
    run slower than the one not if you wiggle for a long enough time)

    The better way to do this is go under all the windows and linux user-level
    timers and talk to the kernel timer.

    I'll give a linux example since it'll fit on one page,

    (You'll want a bunch of headers, I'm not near code so I'm typing this
    off the top of my head so I may have typos, I'm just trying to give an
    idea of what I'm talking about)
    Code:
    double get_clock_time&#40;&#41; &#123;
        gettimeofday&#40; &tv, NULL &#41;;
        return &#40;double&#41; tv.tv_sec + &#40;double&#41; tv.tv_usec * 1.e-6;
    &#125;
    
    main&#40;&#41; &#123;
        double pointdelay = 33;  // 33 microseconds
        double lasttick;
    
        lasttick=get_clock_time&#40;&#41;;
        for &#40;;;&#41; &#123; // just a loop
    
            // do math here
     
           for &#40;double now=get_clock_time&#40;&#41;;now>lasttick+framedelay;&#41; &#123;
                lasttick=now; // do this vs. lasttick=get_clock_time&#40;&#41; to stay synchronized
            &#125;
            sendpointtolaserfunction&#40;&#41;; // insert your function here
        &#125;
    &#125;
    This last code segment will still suffer from system interrupts (no
    way around that except going to a fully buffered design (like my
    own wee system) or to a standalone computer optimized for
    point display (like pangolin)

    Well that's pretty much it... once you free up your 10us of system time
    to do math or whatever, that gives you quite a bit of leeway in what
    you can do... I can do the abstracts above alongs with 2 full 3D transforms
    (one for rotation, one for geometric correction) in 5-7 microseconds.

    If people work on a framework for this stuff, I'd be happy to drop off algorithms
    and code for it! I'm just too swamped on my own projects to work on it.

    Next post is doing it with a framebuffer...

  9. #49
    Join Date
    Jun 2005
    Location
    SoCal
    Posts
    508

    Default

    A framebuffer being effectively a "screen" can cause problems if you're
    doing your own timing as in the parallel port examples above.

    When we did it, we put in special microcode on our board to handle
    real-time vectors, but we can also do it in a frame-by-frame mode.

    The "cheap" solution is to draw a point and pageflip! it'd work just fine
    if the buffer on the laser board is either small or is a single step pipeline
    and knows how much data is waiting.

    The more elegant example is to determine the frame rate, the number
    of points and algorithmically do a frame based cutoff... Or put more
    simply... do what every computer programmer has been doing to make
    abstracts work on standard computer monitors for years :P

    Once you move the frame based paradigm, it shifts how you interact.
    There are two types of abstracts, closed and open... in a closed
    abstract, the points work out such that the start point meets up with
    the end point, as in the case of lissajous... these looks beautiful
    on a framebased system.. You just store the entire frame as one
    image. The reason it works is that a frame-buffered system should
    have enough storage to keep a full flickering frame's worth of
    image in memory. If the abstract is closed but so complex it won't
    fit, then there will be no perceptible difference by bridging frames
    because by that point it should be flickering pretty bad anyways!.

    In the case of an open abstract, the easiest way to do it is to just chop
    the image up based on a simple POV (persistance of vision)...
    so you'd ship the laser points off every 1/60's of a second (or 1/30's of
    a second if the framebuffer has significant overhead doing a page flip)
    If you still notice tearing (this would be a problem in framebuffer design)
    then you move to the next step in doing the abstracts...

    By running an abstract, you will note that it's a merely the graphic
    representation of a math function, by either simply calculating the derivative,
    or by processing one frame ahead, you will get delta velocities... if you
    take each frame at the min of the delta velocities, there will be no
    tearing.

    Keep in mind, IMHO, doing abstracts of a framebuffer system is
    easier than on a parallel port system. This is because you practically
    have all the time in the world to let the computer precalculate the
    data and render the best representation of what you want to get out.
    It is true that it requires one to rethink the problem when transistioning
    programming from non-buffered systems as the optimizations and
    advantages are different.

  10. #50
    Join Date
    Feb 2005
    Location
    Florida
    Posts
    802

    Default

    YADDA...HE'S ALIVE

    Glad to hear from you again

    Nice post !!!
    "My signature has been taken, so Insert another here"
    http://repairfaq.ece.drexel.edu/sam/laserfaq.htm
    *^_^* aka PhiloUHF

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •