Results 1 to 6 of 6

Thread: mscomm

  1. #1
    Member
    Join Date
    Jan 2014
    Location
    Netherlands, Middelburg
    Posts
    34

    mscomm

    in my vfp application i use the mscomm to read from com1 values my scale sends.

    how to use in lianja to read on com1 ?

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,717
    Blog Entries
    17
    Hi Leon,

    How are you reading com1 in VFP?

    If you are using the Microsoft activex communication actions control in VFP you will be able to use that in Lianja.
    Last edited by barrymavin; 2021-11-04 at 19:06.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  3. #3
    Member
    Join Date
    Jan 2014
    Location
    Netherlands, Middelburg
    Posts
    34
    Hi Barry,

    in VFP i use the mscomm32.ocx as ole control on a form.

    i open a port by: thisform.olecontrol1.portopen = .t.

    i command to send info by sending command to the scale thisform.olecontrol1.output="S"+CHR(13)+CHR(10)

    i read out the input (is weighing info from the scale) ctext=SUBSTR(RTRIM(thisform.olecontrol1.input),3,1 4)

    i have now idea how to use this in lianja.

  4. #4
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,717
    Blog Entries
    17
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  5. #5
    Member
    Join Date
    Jan 2014
    Location
    Netherlands, Middelburg
    Posts
    34
    is there some sample code?
    really have now idea how to code

  6. #6
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    6,717
    Blog Entries
    17
    Hi Leon,

    see old VFP doc
    https://docs.microsoft.com/en-us/pre...using-mscomm32

    Code:
    PUBLIC TestCom
    TestCom = createObject("MSCOMMLib.MSComm")
    Testcom.CommPort = 2 && Use Comm2, The second Serial Port.
     Testcom.Settings = "14400,N,8,1" && 14.4 Kbaud, No Parity, 8 data Bits, 1 Stop Bit
    Testcom.PortOpen = .T.
    Testcom.Output = "ATDT555-1234" + chr(13) && Dialing the number
    * The chr(13) is needed to complete the modem command sequence
    Testcom.PortOpen = .F.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us