473,320 Members | 1,858 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

MSComm Question

What is the difference between sending data in these two instances:
1 - Using an array
Dim aOutput(0 to 1) As Byte
Dim Buffer As Variant
aOutput(0) = &H1 'A byte to send
aOutput(1) = &H2) 'A byte to send
Buffer = aOutput
MSComm2.Output = Buffer

2 - Not using an array

MSComm2.Output = "1" & "2"

When I look at the serial output on the oscilloscope instance #1 looks
different from instance #2. In fact if I just do a

MSComm2.Output = "1"

I see the TX line go low again after the stop bit which I find
perplexing.

Thanks much in advance,
Ed V.
Jul 17 '05 #1
2 3730

"Ed Vogel" <ed******@my-deja.com> wrote in message
news:90**************************@posting.google.c om...
What is the difference between sending data in these two instances:
1 - Using an array
Dim aOutput(0 to 1) As Byte
Dim Buffer As Variant
aOutput(0) = &H1 'A byte to send
aOutput(1) = &H2) 'A byte to send
Buffer = aOutput
MSComm2.Output = Buffer

2 - Not using an array

MSComm2.Output = "1" & "2"

When I look at the serial output on the oscilloscope instance #1 looks
different from instance #2. In fact if I just do a

MSComm2.Output = "1"

I see the TX line go low again after the stop bit which I find
perplexing.

Thanks much in advance,
Ed V.


A string of "1" is hexadecimal &H31, quite different than &H1.
If you want to use string, instead of:
MSComm2.Output = "1" & "2"
Use
MSComm2.Output = Chr$(1) & Chr$(2)

Jul 17 '05 #2
"Raoul Watson" <Wa*****@IntelligenCIA.com> wrote in message news:<jX******************@nwrdny03.gnilink.net>.. .
"Ed Vogel" <ed******@my-deja.com> wrote in message
news:90**************************@posting.google.c om...
What is the difference between sending data in these two instances:
- - -snip - - - A string of "1" is hexadecimal &H31, quite different than &H1.
If you want to use string, instead of:
MSComm2.Output = "1" & "2"
Use
MSComm2.Output = Chr$(1) & Chr$(2)


Thanks much. I did not realize the quotes made things into strings in MSComm.
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: jinoy | last post by:
how can i detect an incoming caller's telephone keystroke using modem, using mscomm or other? how can i detect an outgoing call using mscomm? how can i get a caller id using mscomm?
0
by: Tico Tech | last post by:
Hi: I have a question about the Microsoft Communications Control Version 6.0 from visual studio .net. I have this code: Dim Buffer As String Do Buffer = AxMSComm1.Input() //Error, it does...
1
by: Peter Krikelis | last post by:
Hi, I am trying to develope a User Control Library that features MScomm control. I test my user control in a test application. When I run the application I receive the following: An...
0
by: morgal | last post by:
That is one reason I quit using MS custom controls, you have to buy the license. In VB 6 they give you a try it license and then you develop a huge application or small one and find out you don't...
4
by: AA | last post by:
Hi I am developing an app in which I have used a MSComm object. I have opened the port, performed the transactions, and then closed the port. But when I check in the task mamager, the memory...
9
by: Carl Gilbert | last post by:
Hi I'm trying to open a vb6 project in vb.net which uses the mscomm component. When running the vb upgrade wizard in vb.net, an error is raised: Upgrade failed, unable to load reerenced...
6
by: Tico Tech | last post by:
Hi: I have a question about the Microsoft Communications Control Version 6.0 from visual studio .net. I have this code: Dim Buffer As String Do Buffer = AxMSComm1.Input() //Error, it does...
0
by: swati2106 | last post by:
HI, I have develop a apllication , To store the GPS data in database, for that , to read GPS data I have used the Mscomm port, In which I create the object of class RS232 n open that port,...
0
by: cmdolcet69 | last post by:
I get the following error message when I output to the mscomm: An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in COM.exe Additional information: Exception...
0
by: daveman | last post by:
Hello, I'm encountering a "Blue Screen of Death" when I try to send data to a bluetooth sensor via a serial port, using the MSCOMM ActiveX object. I was wondering if anyone has any ideas how to...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.