×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

RS232 Control VB Script?

RS232 Control VB Script?

RS232 Control VB Script?

(OP)
Dear Experts:

I'm tring to control a Sound Level Meter (B&K 2238) by sending command signals from a PC (MSWindows98/2000) to the meter through a RS232 port using a 9-pin cable.

Would any of you please offer me some sample Visual Basic scripts for sending control signals to device connecting to RS232 port.

Thanks a lot!

RE: RS232 Control VB Script?

The best way to do it is to use the MSComm control that comes with Visual Basic.  If you want to see how this works, load and single step through the VBTerm sample that comes with it (should be in the \samples subdirectory; if not, I think you can download it from Microsoft's Visual Basic site).

One important note, though, is that you must know the syntax of the commands to your meter (or other device), as sent via RS-232.  Once you know those you can simply modify the VBTerm code to suit your own purposes.  It's complex at first, but stick with it!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources