Solved

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

Posted on 2002-06-24
3
177 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 3

Accepted Solution

by:
PNJ earned 50 total points
ID: 7107610
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
ID: 7962965
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
ID: 8038970
Per recommendation, force-accepted.

Netminder
EE Admin
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

733 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