Connecting Tech Pros Worldwide Help | Site Map

VB 6.0 mscomm help

Newbie
 
Join Date: Aug 2008
Posts: 1
#1: Aug 24 '08
I am trying to write a hex code to a BK precision power supply 1788 using VB 6.0. The old power supplies I could just write the word volt, the value I wanted, and then a carriage return. The new power supplies need some long 52 character word. In the manual it looks like this:

AA 00 20 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 CB where CB is the check sum of the word. I am using the MSCOMM command to output to the power supply.

Here is an example of my code:
' Setup PSU #2...
Delay (1)
MSComm1.CommPort = 4
Delay (1)
MSComm1.PortOpen = True
Delay (1)
'Picture1.Print "SETTING UP PSU #2"
MSComm1.Output = "AA00200100000000000000000000000000000000000000000 0CB" 'PS TO REMOTE
Delay (1)
MSComm1.PortOpen = False

When I try to write that hex code that I get from the manual to turn the PWR supply from local to remote nothing happens. When I monitor the Comm port bus, It is converting the hex code into something else.

I do not know what to do at this point on how to tell the code to put out exactly the information that I want in the format that I need it to.
Newbie
 
Join Date: Jul 2009
Posts: 1
#2: Jul 28 '09

re: VB 6.0 mscomm help


I have just purchased a 1788 power supply and am wondering if you every got this to work? I am at the same point that you were in Aug of 2008.
Reply