Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 39

Thread: Calling DrLavas LaserDACLibrary (UDAC) from C#.NET

  1. #21
    Join Date
    Aug 2008
    Posts
    30

    Default

    Nagilo, I'm actually looking for a similar thing at the moment, so I downloaded that and had a go. Weirdly enough it does seem to make the galvos work okay, but the laser doesn't switch on. I used the "Test Output" switch on my scanner to manually switch the lasers on and the galvos were making the right pattern, so something was going through. No idea what the problem is, other bits of software have no issue switching the lasers on. Using an Ether Dream.

    Mind you though I'll probably just end up coding my own system from scratch anyway, probably with the help of a C++ Wrapper to communicate between the drivers and the C# code.

  2. #22
    Join Date
    Mar 2012
    Location
    Urduliz, Spain
    Posts
    65

    Default

    Hi

    Nagilo I just make your code work like mine on C++, I will post it here later.

    I will aprecciate any help or advice about the problem I have now. Thanks in advance.

    Im using Drlavas Universal LIbrary + Etherdream using C++ code and C# with Nagilos wrapper. All this for creating my own laser show software.

    The problem comes with the laser accuracy, as Drlava advised me I have made interpolation every 1000 ticks, this means that if I need to draw a line from point (0,0) to (0,5000) I draw 5 points.

    Using this value for interpolation I draw various lines with my first software prototype, just a canvas with line and rectangle tool. As you can se on the attached video, when the laser goes from one line to another it begans to draw strange forms and if the number of lines increases the draw comes more and more crazy. The problem is that the laser draws what I have drawn on the software but it has some difficulties when has to go from one line to another.

    I think that my software is working properly because if i send to my software some coordinates I have obtained from an ILD file it draws that coordinates exactly as they are suppoused to be. To do this test I have a modified code from cfavreau that reads ILD files to obtain a .h file, my version obtains a .h file with an array structure with the frames and points of that ILD file, then I read that .h file with my software and send the coordinates to the laser via Unniversal LIbrary + Etherdream. Whe I read this coordinate it draw properly but no if I drwa from my canvas

    When I see this, I began reading this coordinates form ILD files, and I have seen that this files repeats some of the points, I mean when it has to do blanking it paints 4 times the same point, when it arrives to a 90º corner it also repeats some of the points, when begining a new form it also repeats points.

    ¿any one can help me?

    ¿why repeating this points? ¿wich is the concept or method to repeat this point? ¿when to do it?

    Thanks in advance

    Really will appreciate any advice, IM really lost with this.

  3. #23
    Join Date
    Feb 2009
    Location
    East Coast of Southern Virginia
    Posts
    536

    Default

    Can you repost your video or pictures of the problem and maybe a list of all of the points you are sending in your test case? That would help us a great bit understand what might be going on.

  4. #24
    Join Date
    Jul 2008
    Location
    My momentum is too precisely determined :S
    Posts
    1,777

    Default

    You're right: those repeating points are necessary for a good scanned image. They make sure that the scanners had the time to reach a specific point and stop before continuing. This causes the image to be much better defined with sharp corners and no blanking problems.

    This process is called optimization and I'm not an expert in it, so I can't help you much... I don't know of any algorithms that detect sharp corners and add points, and I believe every program does it differently.

  5. #25
    Join Date
    Mar 2012
    Location
    Urduliz, Spain
    Posts
    65

    Default

    Thanks People, I solved today, Just repeating points at the begining and ending of any line, rectangle, circle I draw. As you say couloredmirrorball the best idea would be to make an algorithm to detect sharp corners and end of an specific form and repeat these final points.

    By the moment Im just repeating 15 times the point at the begining and endign of each line, rectangle or circle. By teh moment Everything works fine with blanking and quality whit this solution.

    Now Im with another issue, i will write about it later

    Thanks

  6. #26
    Join Date
    Mar 2012
    Location
    Urduliz, Spain
    Posts
    65

    Default

    Working with DrLava's Universal Library UDAC + ETHERDERAM + MODIFIED Nagilos C# wrapper

    Solved the blanking and optimizaton problems!!

    Now Im working with animations, I want to move a line from point A to point B this is not a problem, the problem comes when I want to move this line from point A to point B for example in 6 seconds.

    We have the npps value in the Universal Library LDL_DAC_Write_Frame function, Im a bit messy with this value, The problem is if I draw a LIne with animation from Point A to point B and give a specific value to npps in order to get a 6seconds time for the line to go from A to B and the I add another form, with or without animatiion that doesnt matters, in my canvas, this means more points to be painted so the animation comes slower and now the line spends more than 6 seconds to go from A to B.

    Im working on the idea of readjusting the npps value counting the points added with new forms in canvas, so if the line was going from A to B with npps=800 and 50 points, if the new form is 25 points the new value for npps must be new npps=800*75/50.

    I will tell you when i try this.

    Any other idea on how to solve this, or how to DRAW with a time line or something like that.

    Thanks in advance

  7. #27
    Join Date
    Nov 2012
    Posts
    3

    Default C++ & Ether Dream ILDA under real-time control with OLSC or DrLava's UDAC?

    Hello Osithlon, CFavreau, and others,
    I'm seeking example C++ code for sending (xyrgb) points in real-time to Ether Dream. Can anyone help?
    Osithlon, perhaps I can help solve your interpolation problem.

    I am a C++ developer working in cross-platform environments, especially including Mac OSX. Although I am experienced with C++, computational geometry, and open-source software, I am new to laser control. I have just received my Ether Dream and a basic 1W RGB ILDA system. I would be very grateful for any sample C++ code I could view, regardless of OS.

    I also seek advice on whether CFavreau's "Open Laser Show Controller" or Dr.Lava's "Universal DAC SDK" will be best able to help.
    Osithlon: I am unable to locate DrLava's UDAC anywhere online for download -- is it necessary to contact him for a copy?

    I can return the favor by providing code which can (1) intelligently resample line drawings into arbitrary numbers of points; (2) detect corners and other areas of high curvature in line art, and populate these areas with more points; (3) design an optimized laser trajectory for arbitrary line art using (for example) algorithms for solving the Travelling Salesman's Problem.

    Kindly note, I am new to this forum. I am happy to receive replies by PM or by email (golan@flong.com), though the forum would be ideal. Thanks much for any help.

  8. #28
    Join Date
    Mar 2012
    Location
    Urduliz, Spain
    Posts
    65

    Default

    I will post the Nagilos C# code on monday I just finishing it, for me works properly, blanking and drawing OK

    thanks again Nagilo, your wrapper save me lots of hours, nothing to say about the hours I spent with dinamic arrays structures in c++ and now are just some lists in c#.....
    Last edited by Osithlon; 11-23-2012 at 11:13. Reason: repeated post

  9. #29
    Join Date
    Feb 2009
    Location
    East Coast of Southern Virginia
    Posts
    536

    Default

    You have to contact Dr Lava for a copy.

    My OLSC interface doesn't have support for the Etherdream. It is best used when making your own DAC and need a DLL. The UDAC SDK is good for writing software and interfacing with a bunch of DACs.

    Alternatively ... there is probably an Etherdream SDK that will allow you to talk directly to it? I am sure there is one available.

  10. #30
    Join Date
    Apr 2010
    Location
    USA
    Posts
    216

    Default

    Hi Golan -

    I've had a half-done Unix port of the Ether Dream interface code sitting around for a while now, and I just cleaned it up a bit and checked it in. Take a look at: https://github.com/j4cbo/j4cDAC/tree.../libetherdream

    It's based on the Windows DLL, which is one directory up in the source tree, but rewritten to use pthreads and standard unix sockets and have a somewhat saner API. I've only tested it on OS X, and there are still some rough edges - error handling, reconnection in the face of a flaky network, and shutdown/cleanup are not solid yet - but the basics are all there. Enjoy!

Posting Permissions

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