Breadcrumbs

TOnMonitoringModbusCB

Features

This is a callback function for checking modbus I/O state data registered in the robot controller. As the callback function is executed automatically in the case of a specific event, a code that requires an excessive execution time (within 50 msec) within the callback function should not be made.

Parameter

Parameter Name

Data Type

Default Value

Description

*pModbus

struct. MONITORING_MODBUS

-

Refer to definition of structure

Return

None.

Example

C++
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->_tRegister[i]._szSymbol <<": " 
<< pModbus->_tRegister[i]._iValue<< endl;
}

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