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.CommPor t = 4
Delay (1)
MSComm1.PortOpe n = True
Delay (1)
'Picture1.Print "SETTING UP PSU #2"
MSComm1.Output = "AA002001000000 000000000000000 000000000000000 000000CB" 'PS TO REMOTE
Delay (1)
MSComm1.PortOpe n = 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.
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.CommPor t = 4
Delay (1)
MSComm1.PortOpe n = True
Delay (1)
'Picture1.Print "SETTING UP PSU #2"
MSComm1.Output = "AA002001000000 000000000000000 000000000000000 000000CB" 'PS TO REMOTE
Delay (1)
MSComm1.PortOpe n = 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.
Comment