Breadcrumbs

CDRFLEx.set_on_monitoring_modbus

Features

This is a function for registering the callback function that automatically checks information on the current state of the modbus I/O registered in the robot controller. It is useful when functions that should be executed automatically are made.

Parameter

Parameter Name

Data Type

Default Value

Description

pCallbackFunc

TOnMonitoringModbusCB

-

Refer to definition of callback function

Return

None.

Example

Python
void OnMonitoringModbusCB(const LPMONITORING_MODBUS pModbus)
{
// Displays the modbus IO state
cout << "modbus data" << endl;
for (int i = 0; i < pModbus->_iRegCount; i++)
        cout << pModbus->_iRegCount[i]._szSymbol <<": " 
<< pModbus->_iRegCount[i]._iValue<< endl;}

int main()
{
drfl.set_on_monitoring_modbus(OnMonitoringModbusCB)
}