Skip to main content
Skip table of contents

focas_pmc_write_float(handle, addr_type, start_num, write_data, write_count)

Features

This command is used to write PMC Data of Machine Center Controller.

It is used when the data return type is float (4Byte, 32-bit-floatring-point-type).

Caution

Before driving the DRL, be sure to check the PMC Signal Map of the controller before driving.

Parameter

Parameter NameData TypeDefault ValueDescription

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)

  • Case insensitive

start_num

Int


Strart Address Number(0~9999)

write_data

float


The type of data to be transmitted is float(4Byte).

write_count

Int


Enter the number of float data to be transmitted.

Up to 5

Return

ValueDescription

errorCode

0: Success (communication is canceled normally)

Value other than 0: error (see focas_get_error_str)

Exception

ExceptionDescription

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

PY
ErrCode, hMachineCenter = focas_connect("10.10.0.95", 8193, 10)
MC_Command = [-178.12, 11.478]
ErrCode = focas_pmc_write_float(hMachineCenter, "G", 3100, MC_Command, 2)
ErrCode = focas_disconnect(hMachineCenter)
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.