Excel Macro For Checksum Calculation - Brooks Polycold MaxCool Series Installation And Operation Manual

Cryochiller
Table of Contents

Advertisement

Polycold Cryochiller
Installation and Operation Manual

Excel Macro for Checksum Calculation

A macro may be created in Microsoft Excel using Visual Basic to calculate a checksum of a command.
Create an Excel Macro
1. Open Excel.
Click the Microsoft Office button on the upper left corner.
Click on the "Excel Options" button.
Click on the check box to enable "Show Developer tab in the Ribbon".
Click OK.
2. Click the Developer Tab.
In the "Code" tab click Macro Security.
Select "Enable all Macros".
Click OK.
Note: at the end of this session, return the settings to their original state.
3. In the Developer Tab, Code Tab, click on "Visual Basic". The Visual Basic program opens.
If a "Module" window does not open, click "Insert" in the Visual Basic tool bar and click "Module".
4. Copy the command strings below and paste it into the Macro window.
Sub CalculateCheckSum()
Dim CommandString, checksum, character
Dim LengthofCommandString, Counter As Integer
checksum = 0
CommandString = Application.InputBox("Enter the Command To Calculate checkSum (ex.
SW_VER,?)", "CommandString")
LengthofCommandString = Len(CommandString)
For Counter = 1 To LengthofCommandString
character = Mid(CommandString, Counter, 1)
checksum = checksum + (Asc(character) And &H7F)
Next Counter
checksum = checksum And &HFF
checksum = &H3F And (checksum Xor (Int(checksum / (2 ^ 6))))
checksum = (&H30 + checksum) And &H7F
checksumChar = Chr(checksum)
checksumstring = "CheckSum Character is: " & checksumChar
Response = MsgBox(checksumstring, 0, "CheckSum Result")
End Sub
5. Save the Excel program using a name you might remember such as "CheckSum Macro".
Brooks Automation
214072 Revision B
Host Commands
Command Format
7-5

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Polycold MaxCool Series and is the answer not in the manual?

Questions and answers

Related Products for Brooks Polycold MaxCool Series

This manual is also suitable for:

Polycold maxcool 2500lPolycold maxcool 4000h

Table of Contents

Save PDF