Page 6 of 6 FirstFirst ... 456
Results 51 to 55 of 55

Thread: Time Clock

  1. #51
    Hi Barry
    We are using CommTools for Visual Foxpro for all our serial communications. Will that run on Lianja ?
    I have tried to run the code in Lianja.

    public n_pn,ret
    n_pn=2 - "Port Number"
    ret=""
    Set Libr To C:\Lianja\Include\CVF50
    #INCLUDE C:\Lianja\Include\CFHDR.H
    ret=w8250_init(n_pn,n_pn,9600,7,PARITY_EVEN,1,4096 ,4096) && Open x CAS Scale
    Result
    Cannot open 'w8250_init.prg' - errno 2 - No such file or directory

  2. #52
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,368
    Blog Entries
    22
    See this earlier post.
    https://www.lianja.com/community/sho...ht=Magna+Carta

    If you need a "serialport" class submit an enhancement request.
    Last edited by barrymavin; 2024-05-11 at 21:57.
    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. #53
    Senior Member
    Join Date
    Feb 2012
    Location
    São Paulo - Brasil
    Posts
    118
    Very good idea!

  4. #54
    Hello

    I have been working on the Serial communications using MSCOMM32.

    PUBLIC ComForm && ,TestCom
    ComForm = CREATEOBJECT('Form')
    ComForm.AddObject("Testcom","Olecontrol","MSCOMMLi b.MSComm")
    ComForm.Testcom.CommPort = 2
    ComForm.Testcom.Settings = "9600,E,7,1"
    ComForm.Testcom.PortOpen = .T.
    ComForm.Testcom.Output = Chr(87)+Chr(13) // Scale command to send weight data
    ComForm.Testcom.Input
    ComForm.Testcom.PortOpen = .F.

    It does not return the scale information in Lianja but does in Foxpro 9.0
    Please let me know what i am doing wrong.
    Thank you for your time.

  5. #55
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,368
    Blog Entries
    22
    ComForm.Testcom.Input specified like that will call it as a method not access the property.

    See below.

    Code:
    PUBLIC ComForm && ,TestCom
    ComForm = CREATEOBJECT('Form')
    ComForm.AddObject("Testcom","Olecontrol","MSCOMMLib.MSComm")
    ComForm.Testcom.CommPort = 2
    ComForm.Testcom.Settings = "9600,E,7,1"
    ComForm.Testcom.PortOpen = .T.
    ComForm.Testcom.Output = Chr(87)+Chr(13) // Scale command to send weight data
    result = ComForm.Testcom.Input
    ComForm.Testcom.PortOpen = .F.
    Hint:

    in the console.

    set debug on
    obj = createObject("MSCOMMLib.MSComm")

    then quit lianja and read the debug file in c:\lianja\debug

    You can see all the methods and properties available for that activeX object.

    I'd appreciate it if you post a new question in its own thread rather than use this one timeclock thread for every question. Its becoming unwieldy and long.
    Last edited by barrymavin; 2024-05-15 at 22:13.
    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