Chr () Function and Device

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cmdolcet69
    New Member
    • Sep 2007
    • 25

    Chr () Function and Device

    I need a way to communicate to a device so that i can take readings off of it. The code i have submitted is giving me an error when i compile.

    [ comm1.Output = Chr(0x2A)+Chr(0 x04)]


    It says it missing a ')' when compile???? What is it talking about and how can I fix it?
  • QVeen72
    Recognized Expert Top Contributor
    • Oct 2006
    • 1445

    #2
    Hi,

    u may have to use a "Chr$" function , say:

    [code=vb]
    Comm1.Output = Chr$(110) & Chr$(80)
    [/code]

    REgards
    Veena

    Comment

    • cmdolcet69
      New Member
      • Sep 2007
      • 25

      #3
      Originally posted by QVeen72
      Hi,

      u may have to use a "Chr$" function , say:

      [code=vb]
      Comm1.Output = Chr$(110) & Chr$(80)
      [/code]

      REgards
      Veena
      Veena when i add the following:
      Code:
       comm1.output = chr$(110)&chr chr(80)
      I get the follwoing error message: "Type character "&" does not match declared data type 'Char'"


      What does that mean? and how can i fix it?

      Comment

      Working...