Visual Basic Direct Mode Programming Examples

Example 1: This Example is for Axis=0, and Profile=1

DimConst DefaultTimeout As Single = 0.5

frmMain.MSComm1.Output = "@0A1_100000” & Chr$(13) ‘Set Acceleration

Pause DefaultTimeout

frmMain.MSComm1.Output = "@0B1_1000” & Chr$(13)

‘Set Base Speed

Pause DefaultTimeout

 

frmMain.MSComm1.Output = "@0M1_4000” & Chr$(13)

‘Set Maximum Speed

Pause DefaultTimeout

 

frmMain.MSComm1.Output = "@0N1_500” & Chr$(13)

‘Set Index Number

Pause DefaultTimeout

 

frmMain.MSComm1.Output = "@0T1_100” & Chr$(13)

‘Set Complete Time

Pause DefaultTimeout

 

frmMain.MSComm1.Output = "@0+” & Chr$(13)

‘Set Direction CW

Pause DefaultTimeout

 

frmMain.MSComm1.Output = "@0G1” & Chr$(13)

‘Start the Index

Pause DefaultTimeout

 

Example 2: This Example recieves the error code and Version Number from Axis3 Dim Const DefaultTimeout As Single = 0.5

frmMain.MSComm1.Output = "@3!" & Chr$(13) Pause ShortTimeOut

MsgBox ReceiveAscii() frmMain.MSComm1.Output = "@3$" & Chr$(13) Pause ShortTimeOut

MsgBox ReceiveAscii()

Function ReceiveAscii() As String

'wait for the incoming data to get to the buffer Dim BeginTime As Single

Dim A As Integer

Dim B As Integer

BeginTime = Timer

While Main.MSComm1.InBufferCount = 0

DoEvents

If Timer - BeginTime > 0.1 Then GoTo ExitRoutine1

Wend

A = 0: B = Main.MSComm1.InBufferCount While A <> B

A = Main.MSComm1.InBufferCount

Pause 0.02' Fixed time value B = Main.MSComm1.InBufferCount

Wend

ReceiveAscii = Main.MSComm1.Input

Exit Function

#L010185

19

June 2007

Page 19
Image 19
Anaheim MBC10SI1 manual Visual Basic Direct Mode Programming Examples

MBC10SI1 specifications

The Anaheim MBC10SI1 is an advanced temperature controller designed to provide precise monitoring and control for a variety of industrial applications. Built with reliability and flexibility in mind, this device is ideal for both laboratory and production environments. Its compact size allows for easy integration into existing systems, while its robust functionality makes it a popular choice among technicians and engineers alike.

One of the standout features of the MBC10SI1 is its digital display, which provides clear visibility of temperature readings and settings. The user-friendly interface allows operators to quickly adjust parameters, making it easy to customize the control settings according to specific processes. This model is equipped with a high-resolution temperature sensor that ensures accurate and timely readings, reducing the possibility of errors in sensitive applications.

The MBC10SI1 utilizes advanced PID control technology. PID, or Proportional-Integral-Derivative control, is essential for maintaining the desired temperature by continuously adjusting the controller's output. This ensures stable temperatures with minimal fluctuations, which is crucial in processes such as chemical reactions, material processing, or environmental testing.

Additionally, the device supports multiple input types, including thermocouples and RTDs, providing versatility for various applications. It is capable of handling a wide temperature range, making it suitable for both high and low-temperature environments. The MBC10SI1 also features alarm functions that notify users of out-of-range conditions, enabling proactive measures to prevent equipment damage or product loss.

Moreover, the MBC10SI1 includes options for programmable settings, allowing for multiple temperature profiles and schedules. This feature is particularly useful for complex processes that require different temperature parameters at different stages.

Connectivity options enhance the usability of the MBC10SI1, with possibilities for integration into broader automation systems. This feature supports various communication protocols, enabling seamless data transmission and monitoring.

In summary, the Anaheim MBC10SI1 is a state-of-the-art temperature controller designed for precision and versatility. With its robust PID control, multiple input capabilities, alarm functions, and programmable settings, it stands out as a reliable solution for a wide range of temperature-sensitive applications, making it an essential tool in modern industrial operations.