common method patterns
1. device control methods
start/stop operations
// Start a motor
msg.payload = {
    "Speed": 1500,        // RPM
    "Direction": "Forward",
    "RampTime": 10.0      // seconds
};
msg.objectId = "ns=2;s=Motor1";
msg.methodId = "ns=2;s=Start";
// Stop a motor
msg.payload = {
    "EmergencyStop": false,
    "RampTime": 5.0       // seconds to decelerate
};
msg.objectId = "ns=2;s=Motor1";
msg.methodId = "ns=2;s=Stop";
configuration methods
// Configure PID controller
msg.payload = {
    "Kp": 1.2,           // Proportional gain
    "Ki": 0.1,           // Integral gain
    "Kd": 0.05,          // Derivative gain
    "Setpoint": 50.0,    // Target value
    "OutputMin": 0.0,    // Minimum output
    "OutputMax": 100.0   // Maximum output
};
msg.objectId = "ns=2;s=PIDController";
msg.methodId = "ns=2;s=Configure";
2. process methods
recipe execution
// Execute a production recipe
msg.payload = {
    "RecipeId": "RECIPE_001",
    "BatchSize": 1000,    // kg
    "Priority": "Normal",
    "OperatorId": "OP123"
};
msg.objectId = "ns=2;s=BatchReactor";
msg.methodId = "ns=2;s=ExecuteRecipe";
calibration methods
// Calibrate a sensor
msg.payload = {
    "ReferenceValue": 100.0,
    "CurrentReading": 98.5,
    "CalibrationType": "TwoPoint"
};
msg.objectId = "ns=2;s=TemperatureSensor";
msg.methodId = "ns=2;s=Calibrate";
3. maintenance methods
diagnostic methods
// Run system diagnostics
msg.payload = {
    "TestLevel": "Full",
    "IncludeHistory": true,
    "GenerateReport": true
};
msg.objectId = "ns=2;s=SystemDiagnostics";
msg.methodId = "ns=2;s=RunDiagnostics";
reset methods
// Reset alarm conditions
msg.payload = {
    "AlarmIds": ["ALM001", "ALM002", "ALM003"],
    "OperatorId": "MAINT001",
    "Reason": "Maintenance completed"
};
msg.objectId = "ns=2;s=AlarmManager";
msg.methodId = "ns=2;s=ResetAlarms";
next Steps
After mastering basic method calls, explore: