Solved

chr$(0) does not get transmitted(modem)

Posted on 2002-06-24
3
167 Views
Last Modified: 2010-05-02
Hi,
I've found that chr$(0) does not get transmitted over the modem using microsoft's newvbterm.exe or any other such programs.HELP!
0
Comment
Question by:sudeepn
3 Comments
 
LVL 3

Accepted Solution

by:
PNJ earned 50 total points
Comment Utility
NULLs DO get transmitted and other non-printables. It just depends how the program (NEWVBTERM and so on) is handling the data. NULLs can be used a string terminators (as per C) so you may have to use the MSCOMM control and code it yourself. Out of interest, check out the help for Nulldiscard and InputMode. This code fragment may help as well:

   With comPort
      .Handshaking = comNone
      .InputMode = comInputModeText
      .CommPort = 2
      .Settings = "1200,E,8,1"
      .InputLen = 0            ' Tell the control to read entire buffer when Input
                               ' is used.
      .PortOpen = True         ' Open the port.
      .InputLen = 0            ' Read all of the text
      .RThreshold = 1          ' Interrupt every character
   End With

   Dim Temp As Variant ' Do not use a byte array as this intersperses NULLs
   Dim Text As String

   Text = "Hello" & Chr$(0) & " World"
   ' Send the message
   Temp = Text
           
   comPort.Output = Temp

This should work - it's from our crane handling system.
0
 
LVL 49

Expert Comment

by:DanRollins
Comment Utility
Hi sudeepn,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept PNJ's comment(s) as an answer.

sudeepn, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 5

Expert Comment

by:Netminder
Comment Utility
Per recommendation, force-accepted.

Netminder
EE Admin
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now