588,516 active members*
5,969 visitors online*
Register for free
Login
Page 2 of 2 12
Results 21 to 38 of 38
  1. #21
    Join Date
    Jan 2012
    Posts
    33
    I'm afraid that I am going to need to do some more research.

    Please don't spend a lot of time trying to make this work. I'll take a longer look at MM.

    I really appreciate all your help.

    Shannon

  2. #22
    Join Date
    Jan 2012
    Posts
    33
    I don't know if this means anything but using
    KM_Controller_MainStatus instead of .KM_Controller works fine

    Dim controller As KMotion_dotNet.KM_Controller_MainStatus ' .KM_Controller


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

    Debug.Print controller

    End Sub

  3. #23
    Join Date
    Oct 2004
    Posts
    147
    Shannon,

    That does not make a lot of sense.

    The Main_Status class is actually of type::

    KMotion_dotNet.KM_Controller.KM_Controller_MainSta tus

    So in .net, that means that KM_Controller_MainStatus class is a nested class of KM_Controller in the KMotion_dotNet namespace

    I have to imagine the instance you created is null yes?

    -Brad Murry

  4. #24
    Join Date
    Jan 2012
    Posts
    33
    Brad,
    Yes, the Debug.Print controller output is as you said.
    KMotion_dotNet.KM_Controller.KM_Controller_MainSta tus

    I don't know if the instance is Null. This is the entire code in the project.

    Dim controller As KMotion_dotNet.KM_Controller_MainStatus ' .KM_Controller

    Private Sub Form_Load()
    Set controller = New KMotion_dotNet.KM_Controller_MainStatus ' .KM_Controller
    Debug.Print controller
    End Sub

    Shannon

  5. #25
    Join Date
    Oct 2004
    Posts
    147
    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

  6. #26
    Join Date
    Jan 2012
    Posts
    33
    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.

  7. #27
    Join Date
    Oct 2004
    Posts
    147
    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

  8. #28
    Join Date
    Jan 2012
    Posts
    33
    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.

  9. #29
    Join Date
    Oct 2004
    Posts
    147
    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

  10. #30
    Join Date
    Jan 2012
    Posts
    33
    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

  11. #31
    Join Date
    Oct 2004
    Posts
    147

    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

  12. #32
    Join Date
    Oct 2004
    Posts
    147
    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

  13. #33
    Join Date
    Jan 2012
    Posts
    33
    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

  14. #34
    Join Date
    Jan 2012
    Posts
    33

    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.

  15. #35
    Join Date
    Oct 2004
    Posts
    147
    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

  16. #36
    Join Date
    Jan 2012
    Posts
    33
    would you consider adding the sample application + notes to the Dyno code base?

    Gladly

  17. #37
    Join Date
    May 2006
    Posts
    4060
    Hi Shannon,

    Yes we would really like to include that in the Release.

    If possible please make a VB6 example that is under the "

    C:\KMotion429z\PC VB Examples"

    directory and targets the executable to:

    C:\KMotion429z\KMotion\Release

    directory

    It wil be included in the next release.

    Thanks!
    TK
    TK
    http://dynomotion.com

  18. #38

    Re: DynoMotion .Net

    Quote Originally Posted by bradodarb View Post
    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
    Hi, Brad
    Thank you for giving this guide.

Page 2 of 2 12

Similar Threads

  1. Possible to do Transformation Matrix with Dynomotion CNC?
    By vetsen in forum Dynomotion/Kflop/Kanalog
    Replies: 3
    Last Post: 11-03-2014, 12:52 PM
  2. DynoMotion Smile
    By michaelthomas in forum Dynomotion/Kflop/Kanalog
    Replies: 0
    Last Post: 05-31-2012, 04:09 PM
  3. Dynomotion
    By carlcnc in forum Controller Cards
    Replies: 0
    Last Post: 03-06-2009, 06:16 PM
  4. Any one use a Dynomotion controller?
    By DennisCNC in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 6
    Last Post: 09-09-2008, 03:02 PM
  5. Dynomotion and Mach3
    By DennisCNC in forum Controller Cards
    Replies: 1
    Last Post: 04-06-2008, 05:41 AM

Posting Permissions

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