Page 3 of 4 FirstFirst 1234 LastLast
Results 25 to 36 of 37

Thread: DynoMotion .Net

  1. #25
    Registered bradodarb's Avatar
    Join Date
    Oct 2004
    Location
    usa
    Posts
    147
    Downloads
    0
    Uploads
    0
    Can you see the members available in the KMotion_dotNet.KM_Controller_MainStatus?

    There should be a few methods and a couple properties.

    -Brad Murry


  2. #26
    Registered
    Join Date
    Jan 2012
    Location
    us
    Posts
    29
    Downloads
    0
    Uploads
    0
    No I see no members. I can see all the classes in the object browser but none of them have any members except KM_Token which has 3 constants.


  3. #27
    Registered bradodarb's Avatar
    Join Date
    Oct 2004
    Location
    usa
    Posts
    147
    Downloads
    0
    Uploads
    0
    Hello Shannon,


    Maybe we can make a simple .net class lib with one class that has a method to return a cheesy string like "hello world".

    By doing this we can verify that the steps I outlined from MSDN work and that we are not missing something.

    From there we can take further action.

    -Brad Murry


  4. #28
    Registered
    Join Date
    Jan 2012
    Location
    us
    Posts
    29
    Downloads
    0
    Uploads
    0
    Maybe we can make a simple .net class...

    Ok Brad,
    I'm tied up until the weekend but will give it a try then. Tonight I am playing with MM and 3 servos on the kitchen table.


  • #29
    Registered bradodarb's Avatar
    Join Date
    Oct 2004
    Location
    usa
    Posts
    147
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by sdavenport View Post
    I am playing with MM and 3 servos on the kitchen table.
    Sounds like a good time to me!

    -Brad Murry


  • #30
    Registered
    Join Date
    Jan 2012
    Location
    us
    Posts
    29
    Downloads
    0
    Uploads
    0
    Hello Brad,
    Regarding the "automation error" I was getting in vb6. I copied all the kmotion dll's to the same folder that my project is running from and I no longer get any errors in the code show below. However, no intellisense properties or methods are showing for controller.
    Shannon

    Dim controller As KMotion_dotNet.KM_Controller

    Private Sub Form_Load()
    Set controller = New KMotion_dotNet.KM_Controller

    End Sub


  • #31
    Registered bradodarb's Avatar
    Join Date
    Oct 2004
    Location
    usa
    Posts
    147
    Downloads
    0
    Uploads
    0

    HTML CNC controller

    Hello,

    I posted a thread on the DynoMotion group about the possibility of a CNC-Kflop controller with an HTML user interface.

    I thought I would post here as well to see if there was a broader audience than the DynoMotion Yahoo group.

    I have created a prototype Windows application that can host HTML content. The application can communicate to the HTML page and the HTML can also trigger commands in the application.

    Imagine just writing an HTML web page and simply by setting an element's ID it would automatically hook up to the controller.


    I am trying to see if there is anyone who might fall within any of the following scenarios::

    1) OEM’s or integrators here that could make use of HTML technology in lieu of Mach3 with custom screens
    2) Hobbyists who are proficient in basic formatting HTML and would like to create their own custom interfaces without needing to write any code
    3) Hobbyists who want to create their own interface that have no knowledge of HTML, but can use a free website designer to build a custom interface
    (see Free Website Design Software)



    If you fall into any of these categories or you have knowledgeable constructive criticism to offer please let me know.

    -Brad Murry


  • #32
    Registered bradodarb's Avatar
    Join Date
    Oct 2004
    Location
    usa
    Posts
    147
    Downloads
    0
    Uploads
    0
    Hello Shannon,

    I have been playing around with accessing the .net libs via Javascript and it seems I can if I perform the following from a Visual Studios Command Prompt:

    regasm KMotion_dotNet.dll /tlb:KMotion_dotNet.tlb


    It regeisters the dll for COM, and you can see it in VBA when you add a reference, so it should also show up in VB6.


    Regards,
    Brad Murry


  • #33
    Registered
    Join Date
    Jan 2012
    Location
    us
    Posts
    29
    Downloads
    0
    Uploads
    0
    Hi Brad,
    I appreciate you keeping me in the loop on this. I spent a fair amount of messing with regasm, regtlbv12, exptlb and thier associated paramaters etc. I just tried setting a reference in VBA and that didn't work either. I can set the reference to the tlb but in the object browser the only class I see is globals and it has no members. Your dll I'm registering is v1.0.1.0 I've tried regasm V2.0.50727.3053 and V4.0.30319.1 with the same results.
    Shannon


  • #34
    Registered
    Join Date
    Jan 2012
    Location
    us
    Posts
    29
    Downloads
    0
    Uploads
    0

    Using KMotion_dotNet.dll in VB6

    Hi Brad,

    I finally got this working. I'm not sure everything I did was or is needed but its working.

    downloaded C# VS2010 free express version
    Open C:\KMotion428\KMotion_dotNet\KMotion_dotNet.csproj from c#

    Made the following changes to the project options:
    Build Events
    Pre build: "$(FrameworkSdkDir)bin\gacutil.exe" "$(TargetPath)" /u
    Post build: "$(FrameworkSdkDir)bin\gacutil.exe" /i "$(TargetPath)" /f
    Check 'Make assembly com visible' in assembly information
    Check 'Sign the assembly' in signing
    Check 'Register for com interop' in Build

    Made changes to the code as follows:
    Modify the classes and add
    [ClassInterface(ClassInterfaceType.AutoDual)] ///without this VB will work but without intellisense.
    ad this before the public partial class line as shown below.

    like this:
    in KM_Controller.cs
    [ClassInterface(ClassInterfaceType.AutoDual)]
    public partial class KM_Controller : IDisposable

    in KM_CoordMotion.cs
    [ClassInterface(ClassInterfaceType.AutoDual)]
    public partial class KM_CoordMotion : IDisposable

    in KM_Interpreter.cs
    [ClassInterface(ClassInterfaceType.AutoDual)]
    public partial class KM_Interpreter : IDisposable

    Rebuild solution and then from a command prompt use Regasm.exe. The build will create a dll and a tlb file in C:\KMotion428\KMotion\Debug. I copied these 2 files to the Release folder and used Regasm there. You will need to locate regasm and copy it to the release folder.

    Use regasm like this
    C:\KMotion428\KMotion\Release\regasm KMotion_dotNet.dll /tlb:KMotion_dotNet.tlb /codebase

    In VB set a reference to KMotion_dotNet.tlb and paste the following code in a form:
    Dim ctrl As New KMotion_dotNet.KM_Controller

    Label1.Caption = "This is the board number returned from KM_Controller: " & ctrl.BoardNumber
    Label2.Caption = "This is the board number returned from KM_CoordMotion: " & ctrl.CoordMotion.BoardNumber
    Label3.Caption = "This is the board number returned from KM_Interpreter: " & ctrl.Interpreter.BoardNumber

    Saved this project to the C:\KMotion428\KMotion\Release folder
    When I tried to run the project I was getting automation errors. I had to double click .vbp in the release folder for it to work. Some kind of a path dll not found problem I suspect.

    That's all I've done at this point.


  • #35
    Registered bradodarb's Avatar
    Join Date
    Oct 2004
    Location
    usa
    Posts
    147
    Downloads
    0
    Uploads
    0
    That's all I've done at this point.
    Thats funny.... looks like you've done a lot!


    Thanks for sharing the details, it is pretty cool that you have it working.

    The directory thing is a bit of a bear right now, for proto apps I just move the project output to the KMotion4xx\KMotion\Release, and for production apps I load the KMotion_dotNet.dll at runtime so I can just point to the most current DLL.

    I'm not sure how to do that in vb6/COM, so you might consider just running your apps from the Dynomotion install directory.

    Once you get this all dialed in would you consider adding the sample application + notes to the Dyno code base? This way other people using COM can use it too.



    Thanks for the update,

    Brad Murry


  • #36
    Registered
    Join Date
    Jan 2012
    Location
    us
    Posts
    29
    Downloads
    0
    Uploads
    0
    would you consider adding the sample application + notes to the Dyno code base?

    Gladly


  • Page 3 of 4 FirstFirst 1234 LastLast

    Similar Threads

    1. Forum for Dynomotion/Kflop
      By Al_The_Man in forum Dynomotion/Kflop/Kanalog
      Replies: 0
      Last Post: 11-19-2011, 11:14 PM
    2. Bridgeport series I mill using dynomotion controller
      By krz2_2000 in forum Bridgeport and Hardinge Mills
      Replies: 21
      Last Post: 04-06-2010, 03:34 AM
    3. Dynomotion
      By carlcnc in forum Controller Cards
      Replies: 0
      Last Post: 03-06-2009, 12:16 PM
    4. Any one use a Dynomotion controller?
      By DennisCNC in forum General CNC (Mill and Lathe) Control Software (NC)
      Replies: 6
      Last Post: 09-09-2008, 10:02 AM
    5. Dynomotion and Mach3
      By DennisCNC in forum Controller Cards
      Replies: 1
      Last Post: 04-06-2008, 12:41 AM

    Tags for this Thread

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.