Com port communication

Toddy_BoyToddy_Boy Member Posts: 231
Hi Guys

I need to record a weighscale reading through a com port. Many of the posts doing a similar thing on the forum are quite old and use nfcomm. Is there a better way of reading the com port? I'm using Nav 5.1 on SQL Server.

I've registered the nfcomm ocx butit does not show in the list Automation list, so how do I decalre a variable of type nfcomm?

Cheers
Life is for enjoying ... if you find yourself frowning you're doing something wrong

Comments

  • bbrownbbrown Member Posts: 3,268
    Use mscomm32.ocx (Custom Control). It's the tried and true method.
    It's an OCX not Automation Controller.
    There are no bugs - only undocumented features.
  • ara3nara3n Member Posts: 9,256
    edited 2008-11-04
    This website should help you with downloading mscomm32.ocx. Register if afterward.

    http://www.yes-tele.com/mscomm.html
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • ara3nara3n Member Posts: 9,256
    Here is mibuso thread on using it.

    viewtopic.php?t=22998&highlight=com+port
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Toddy_BoyToddy_Boy Member Posts: 231
    Thanks for the replies, I have the MScomm32.ocx installed from VB6, and have read the thread on using the control however I am at a loss as how to declare a variable of type MSComm ](*,)

    What am I overlooking?

    Cheers
    Life is for enjoying ... if you find yourself frowning you're doing something wrong
  • garakgarak Member Posts: 3,263
    if you declare a variable do you see the DataType OCX ?
    If no, you must expand your license to granule 1750.

    Regards
    Do you make it right, it works too!
  • Toddy_BoyToddy_Boy Member Posts: 231
    Ahhh ... now it make sense, I've never used that before. Thanks a lot. \:D/

    Now does anyone have a lorry weighscale I can borrow :P :P
    Life is for enjoying ... if you find yourself frowning you're doing something wrong
  • Toddy_BoyToddy_Boy Member Posts: 231
    I have declared the OCX
    Name       DataType   Subtype                                                       Length
    CommCtrl  OCX          Microsoft Communications Control, version 6.0	
    

    and get the message Cannot load the selected type library #-o

    Any ideas?
    Life is for enjoying ... if you find yourself frowning you're doing something wrong
  • ara3nara3n Member Posts: 9,256
    which nav version are you using? you get the error when you run it?
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Toddy_BoyToddy_Boy Member Posts: 231
    Nav 5.1, I get the error when I try to save the form in the object designer.
    Life is for enjoying ... if you find yourself frowning you're doing something wrong
  • ara3nara3n Member Posts: 9,256
    I don't get the error. did you try to register it from navision? Tools->custom controls?
    Also I've put the ocx in windows\system32 folder.

    did you restart nav? os?
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Toddy_BoyToddy_Boy Member Posts: 231
    from Tools->Custom Controls I can see the OCX
    InprocServer32 Name
    C:\WINDOWS\system32\MSCOMM32.1 Microsoft Communications Control, version 6.0

    When I try to register/unregister it I get the error
    Could not load the OLE control

    ](*,) ](*,)
    Life is for enjoying ... if you find yourself frowning you're doing something wrong
  • ara3nara3n Member Posts: 9,256
    Hmm I don't know. You can try this ocx from mibuso.com


    http://www.mibuso.com/dlinfo.asp?FileID=68



    Here is thread on this.

    http://dynamicsuser.net/forums/p/11937/11937.aspx
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Toddy_BoyToddy_Boy Member Posts: 231
    From the list of OCX controls I clicked Control->Browse, found the MSComm32.ocx in the system32 folder, clicked on it at which point something registered the OCX. Now I can add it to the form. YEY!! \:D/ \:D/

    Thanks for the help ... tho I still need a weigh bridge for testing :lol:
    Life is for enjoying ... if you find yourself frowning you're doing something wrong
  • ara3nara3n Member Posts: 9,256
    hmm. Haven't tried it myself but.


    http://www.virtual-serial-port.com/
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.