focas_pmc_read_double(handle, addr_type, start_num, read_count)
Features
This command is used to read PMC Data of Machine Center Controller.
It is used when the data return type is double (8Byte, 64-bit-floatring-point-type).
Caution
Before driving the DRL, be sure to check the PMC Signal Map of the controller before driving.
Parameter
Parameter Name | Data Type | Default Value | Description |
---|---|---|---|
handle | int | - | Communication specific control constant value required for use of FOCAS |
addr_type | str | G (Output signal from PMC to CNC) F (Input signal to PMC from CNC) Y (Output signal to PMC from machine) X (Input signal from PMC to machine) A (Message display) R (Internal relay) T (Timer) K (Keep relay) C (Counter) D (Data table) M (Input signal from other PMC path) N (Output signal to other PMC path) E (Extra relay) Z (System relay)
| |
start_num | Int | Strart Address Number(0~9999) | |
read_count | int | Read from Start Address Number Number of doubles (max. 5) |
Return
Value | Description |
---|---|
errorCode | 0: Success (communication is canceled normally) Value other than 0: error (see focas_get_error_str) |
pmc_data | PMC data (double type) |
Exception
Exception | Description |
---|---|
DR_Error (DR_ERROR_TYPE) | Parameter data error occurred |
DR_Error (DR_ERROR_VALUE) | Parameter value is invalid |
DR_Error (DR_ERROR_RUNTIME) | C Extension module error occurred |
DR_Error (DR_ERROR_STOP) | Program terminated forcefully |
Example
ErrCode, hMachineCenter = focas_connect("10.10.0.95", 8193, 10)
ErrCode, PMC_Data = focas_pmc_read_double(hMachineCenter,"D",10,3)
ErrCode = focas_disconnect(hMachineCenter)