Page 1 of 3 123 LastLast
Results 1 to 10 of 29

Thread: SDK for DACs

  1. #1
    Join Date
    Aug 2007
    Location
    Indianapolis, IN
    Posts
    196

    Default SDK for DACs

    What support is there for writing your own laser software?

    How many DACS have SDKs?

  2. #2
    Join Date
    Dec 2006
    Location
    Pflugerville, TX, USA
    Posts
    1,977

    Default

    Moncha DAC has an API. I am writing my own software using it.

  3. #3
    Join Date
    Dec 2006
    Location
    Netherlands
    Posts
    964

    Default

    Easylase DAC has an API. I am writing my own software using it.

  4. #4
    Join Date
    Aug 2007
    Location
    Indianapolis, IN
    Posts
    196

    Default

    I have a MediaLas USB box at the moment, I've opened up the driver and it's the standard FTDI one - so I can write to it, but I don't know how to format the information to provide meaningful data to the amps.

    Is there anything available for this DAC?

    Can you post some sample code for the EasyLase box, so I can get a feel for what needs to be done?
    Thanks,

    Steve

  5. #5
    Join Date
    Dec 2006
    Location
    Pflugerville, TX, USA
    Posts
    1,977

    Default

    Hey Zoof, would you mind giving me some info about your DAC API? How do you send data to your DAC: Frame by frame, point by point? Does your DAC handle point timing? How can you tell when your DAC is ready to accept the next point or frame?

    Thanks,
    Gary

  6. #6
    Join Date
    Dec 2006
    Location
    Netherlands
    Posts
    964

    Default

    The easylase API lets you write frames of 16000 points maximum to the card. It is dubble buffered so it is displaying one buffer while you can write to the other.
    So you can check the status of the card:
    Code:
    int status = myEasyLase->getStatus( card );  //0: USB error, 1: ready, 2: busy
    If it is ready you can write a frame to it which will be displayed immediately thereafter using a line like:
    Code:
     myEasyLase->writeFrameNR(card, &outPoints[0], outPoints.size(), speed, 1);
    The arguments of the function are:
    card number (you can have more than one )
    address of the beginning of the array of points that make up the frame
    number of points in frame
    speed in kpps
    repeat number

    Note that in my code outPoints is a C++ vector but you can use an array.

    Each point in the vector / array is a struct:
    Code:
    struct Point {
    	Point(){x = y = 2048; r = g = b = 0; i = 0;}
    		unsigned short x;	// 2 bytes, value: 0-4095 (x-coordinate)
    		unsigned short y;	// 2 bytes, value: 0-4095 (y-coordinate)
    		unsigned char  r;	// 1 byte, value: 0-255 (red)
    		unsigned char  g;	// 1 byte, value: 0-255 (green)
    		unsigned char  b;	// 1 byte, value: 0-255 (blue)
    		unsigned char  i;	// 1 byte, value: 0-255 (intensity)
    	};
    Hope this helps.
    Is it somewhat the same for the Moncha DAC and the MediaLas DAC?

    Which programming languages are you using?

  7. #7
    Join Date
    Dec 2006
    Location
    Pflugerville, TX, USA
    Posts
    1,977

    Default

    Pretty much the same for the Moncha DAC. It is double buffered and accepts a frame at a time. The raw interface is C but I am using a C# wrapper. The Moncha DAC supports up to 30Kpps (16bit x,y) and 8bit analog colors (RGB). So, it is pretty nice. The downer is that it doesn't have any TTL outputs.

    The only hard part about it is that I have to keep track of how long it should be before I can send the next frame. If I send it too late, the previously frame will repeat. If I send it too early, it will get discarded. So, like you, I need to send the frame to the second buffer while the first buffer is being drawn. I wish there was some callback mechanism from the DAC that says, "HEY SEND ME A NEW FRAME NOW!"

    How are you handling this problem? Do you just loop and check that status code? (myEasyLase->getStatus( card ); ) Or you timing it like I am?

    I bet I could add EasyLase support to my software really easy if you are interested in playing with it. And, you could probably add support for my DAC as well. Maybe that would be fun so we could trade ideas/software.
    Last edited by carmangary; 09-08-2007 at 07:56.

  8. #8
    Join Date
    Dec 2006
    Location
    Netherlands
    Posts
    964

    Default

    Yep, the getStatus is called from the idle loop (using FLTK library to handle widgets etc) and whenever the card is ready the next frame is sent. There should be nicers ways to do this but for now it works fine. I never really liked timing problems in programming. A callback or interrupt would be nice.
    The 16bits on xy and 12 bits on RGB are nice on your DAC though.
    What kind of lasershow software are you working on?

  9. #9
    Join Date
    Dec 2006
    Location
    Pflugerville, TX, USA
    Posts
    1,977

    Default

    Actually, only bits on the color. I was wrong about that part.

    My laser show software is somewhat simple but powerful enough to easily create a quick and dirty show that is synchronized to music. At least that is my goal.

    I can load a song (wav, mp3, etc) and it will generate a time line. I can add tick marks to my time line by playing the song and clicking the mouse when i want a marker. I can use those as references if I want. I can also drag ilda files (or a portion of one) onto the time line at any point and I can apply effects to each individual ilda on the time line. So, I can make one rotate in any direction at any speed, zoom in and out, change colors, etc. When I go to play the show it starts the song and when it reaches the places where an ilda file is assigned to the time line it will start playing the ilda file with the effects that I assigned to it.

    Anyway that is the basic idea. I plan on adding the ability to add abstract effects as well as the ability to control aux devices like a lumia wheel, fog machine, etc. But, one step at a time.

  10. #10
    Join Date
    Dec 2006
    Location
    Netherlands
    Posts
    964

    Default

    that sounds pretty cool. Are you using the fmod library for sound? I'm planning to use that one at some point when I get around to it.
    My aim was to be able to use scalable vector graphics for laser art creation. So my application now loads .svg files created with Inkscape which has very nice support for color gradients. Each layer in the svg file is loaded as a separate frame so animations can be created. I'm still working on a good algorithm for transforming the splines into the least amount of points with decent graphics - being a bit of a perfectionist.
    The loaded graphics can be displayed on the easylase dac and saved in Ilda RGB format. That export feature would allows it to be used with any other software like Mamba to be used in shows etc (if only Mamba would correctly load the colors of the ILDA RGB format !!!) It also supports good color control to compensate for the non-linearity of the analogue laser modulation.
    Does your application read the ILDA RGB (3) format?

Posting Permissions

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