create_variable
Create a global variable in Control Expert PLC projects by specifying name and IEC type, with optional address and initial value.
Instructions
Create a global variable.
type_name is an IEC type ('BOOL', 'EBOOL', 'INT', 'DINT', 'REAL', 'TIME', 'STRING', ...), an array ('ARRAY[0..9] OF INT'), a DDT or a DFB type name. address is an optional topological address like '%MW100' or '%Q0.2.0'.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"type_name": "<type_name>"
},
"name": "create_variable"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| type_name | Yes | ||
| comment | No | ||
| address | No | ||
| initial_value | No |