?
Solved

sending hex protocols via mscomm to control a video projector

Posted on 2001-08-31
7
Medium Priority
?
369 Views
Last Modified: 2012-05-04
i am currently trying to control a projector through rs232 using mscomm but i cannot get it to work the protocol command i am sending is "A5h 01h 01h 00h 01h 03h 00h 01h 00h 01h 17h 00h 80h 08h 00h 06h 40h54h 2Eh 00h 00h 00h A1h 5Ah"                 i know this is the right command as the projector comes with its own software for testing protocol commands on the projector.
this is what i have tried so far.

    MSComm1.CommPort = 1
    MSComm1.Settings = "38400,E,8,1"
    MSComm1.InputLen = 0    '
    MSComm1.PortOpen = True
    MSComm1.Output = "A5h 01h 01h 00h 01h 03h 00h 01h 00h 01h 17h 00h 80h 08h 00h 06h 40h54h 2Eh 00h 00h 00h A1h 5Ah"
i think the problem lies in that i am sending ASCI instead of the needed hex anyone have any ideas
thanks
0
Comment
Question by:VMP
7 Comments
 
LVL 6

Accepted Solution

by:
anthony_glenwright earned 400 total points
ID: 6447257
Instead of:

MSComm1.Output = "A5h 01h 01h 00h 01h 03h 00h 01h 00h 01h 17h 00h 80h 08h 00h 06h 40h54h 2Eh 00h
00h 00h A1h 5Ah"


Try something like:

strOutput = "&HA5 &H01 &H01 &H00 &H01 &H03 &H00 &H01 &H00 &H01 &H17 &H00 &H80 &H08 &H00 &H06 &H40 &H54 &H2E &H00
&H00 &H00 &HA1 &H5A"

For each vntItem in Split(strOutput, " ")
  MSComm1.Output = val(vntItem)
next
0
 

Author Comment

by:VMP
ID: 6447262
ill give that a try
thanks
0
 

Author Comment

by:VMP
ID: 6447267
ill give that a try
thanks
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 12

Expert Comment

by:roverm
ID: 6447382
Here a nice example to address up to 4 comm ports without the use of MSCOMM :

http://www.thescarms.com/vbasic/CommIO.asp

D'Mzzl!
RoverM
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7205363
Hi VMP,
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 anthony_glenwright's comment(s) as an answer.

VMP, 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.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 5

Expert Comment

by:Netminder
ID: 7240852
Per recommendation, force-accepted.

Netminder
CS Moderator
0
 

Expert Comment

by:hsctng
ID: 7827536
Hi,

If you want to send Hex through Comm Port, I think you should output the byte array for Output of MSComm.

Here is the VB code for your reference!!


Dim HexData(1) As Byte
HexData(0) = CInt(Val("&H" & "AA"))  ' Send &HAA
MSComm1.Output = HexData
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

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…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

864 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