Mint NextMove PCI Manual de usuario Pagina 42

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 70
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 41
6-12 Advanced Features
5. To use the MintMT ActiveX
control in the project, place it
on the form.
The properties of the ActiveX
component include a field
called Name this is the name
used in the code to identify
the ActiveX control, in this
example it is ‘MintController’
6. To use the MintMT ActiveX control to communicate with a controller a handle to the controller must
be created. This can be done when the form loads. Double click on the form, this will open an editor
window with the cursor in the function called when the form loads. Add the code:
procedure TForm1.FormCreate(Sender: TObject);
begin
// Create handle to controller
MintController.setNextMovePCI1Link (0, 0);
end;
The above code will create a handler to a NextMove PCI controller, card number 0 and node number
0.
Add a button to the form and double click on the button. Borland Delphi will open an editor window
with the cursor in the function called when the button is clicked. Add the code:
procedure TForm1.Button1Click(Sender: TObject);
var
bState: WordBool;
begin
// Read the state of the relay
bState := MintController.Relay [0];
// Invert the state of the relay
MintController.Relay [0] := not(bState);
end;
Vista de pagina 41
1 2 ... 37 38 39 40 41 42 43 44 45 46 47 ... 69 70

Comentarios a estos manuales

Sin comentarios