Results 1 to 7 of 7

Thread: serial objects

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2003
    Location
    Porto Alegre, RS
    Posts
    210

    serial objects

    i have for serial objects on my application, but all the time that i need to use someone, i have to reinitialize it, because with some time running the app, all the serials get the same properties, anybody knows why is that happening??????


    Thank you,
    Guilherme Costa

  2. #2
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682
    Show us some code.
    I don't live here any more.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2003
    Location
    Porto Alegre, RS
    Posts
    210
    VB Code:
    1. private sub test()
    2.   init_serial1()
    3.   serial1.output = "123 de oliveira 4"
    4.   init_serial1()
    5.   serial2.output = "567 de oliveira 8"
    6. end sub
    7.  
    8. private sub init_serial1()
    9.   serial1 = new MSCommLib.MSComm
    10.   serial1.port = 1
    11.   serial1.Baud = 9600
    12. end sub
    13.  
    14. private sub init_serial2()
    15.   serial2 = new MSCommLib.MSComm
    16.   serial2.port = 2
    17.   serial2.Baud = 19200
    18. end sub

    if i dont do the init_serialx, it writes on the wrong serial port, sometime after i start mu app, serial1 and serial2 will be the same object, unless i restart each one, but sometime later the two objects refer to only one.

    I don't know if i was to clear, anything just scream!!

    Thank you very much,
    Guilherme Costa

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jan 2003
    Location
    Porto Alegre, RS
    Posts
    210
    anybody have some tip for me???

    this is pissing me off!! I've tried a lot of resources, nothing seems to give me some good result.

    I don't know what is wrong with the piece of the system, it just doesn't work like i need it to work!!

    Thanks for any help,
    Guilherme Costa

  5. #5
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682
    VB Code:
    1. private sub test()
    2.   init_serial1()
    3.   serial1.output = "123 de oliveira 4"
    4.   init_serial[b][color=red]2[/color][/b]()
    5.   serial2.output = "567 de oliveira 8"
    6. end sub


    Hows that?
    I don't live here any more.

  6. #6
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682
    Relax dude.

    It wasn't a serial object as you put it, it was an MSCommControl.

    Please try to be more accurate when you post the original question, it helps get a result faster Then you wouldn't get so excited about it. Also try to post code, too.
    I don't live here any more.

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Jan 2003
    Location
    Porto Alegre, RS
    Posts
    210
    i writed it wrong, it is init_serial2 on that code!!

    the problem is MSCommLib????

Posting Permissions

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



Click Here to Expand Forum to Full Width