mdtOpen (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

All

Firmware version:

1.02 / 1.00.00


This function starts up the connection to the MDT by using the serial port specified.

It must be called before any communication with the MDT can occur. Note that the MDT does not have to actually be connected when this function is called.

 

When the MDT is opened, there will be no need for further intervention from the VPL program to keep the session up.

 

Note:

Only port=1 will support the mdtPower() functionality and using port=0 will not work with the standard interface cable.

For information on how to use port=0, please contact your supplier.

 

Note:

If used with NMP, navOpen() must be called before mdtOpen() by using the same port. mdtPower() will work regardless of the port.

 

Input:                

port : SINT (0/1) default 1

This selects which serial port to use (see serial port enumeration).

 

Returns: INT

1

- Invalid port.

0

- Success.

 

Declaration:

FUNCTION mdtOpen : INT;
VAR_INPUT
  port : SINT := 1;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
VAR
  rc : INT;
END_VAR;
 
BEGIN
  ...
  // Open MDT
  rc := mdtOpen(port := 1);
  ...
END;
END_PROGRAM;