LONWORKS

Communication control for the LonWorks driver.
Mode |
Mnemonic |
Syntax |
2 | READCONFIGPROPERTY | 1 |
3 | STARTNETWORK | 2 |
4 | STOPNETWORK | 2 |
5 | STARTNODE | 3 |
6 | STOPNODE | 3 |
9 | SENDMESSAGE | 6 |
Common arguments
Argument |
Meaning |
CommObjectName |
The name of a LonWorks communication object, under the form "NetworkName" to specify a network or "NetworkName/NodeName" to specify a node. Type STR. |
NetworkName |
The name of a LonWorks network. Type STR |
NodeName |
The name of a LonWorks node. Type STR |
Syntax 1
IntVal = LONWORKS(Mode, NetworkName, NodeName);
Return type: INTEGER.
Execution
Mode |
Mnemonic |
Action |
2 |
READCONFIGPROPERTY |
Refresh the collection of variables related to the configuration properties of the specified LonWorks network and node. Return: 1 if OK, else 0 |
Syntax 2
IntVal = LONWORKS(Mode, NetworkName);
Return type: INTEGER.
Execution
Mode |
Mnemonic |
Action |
3 |
STARTNETWORK |
Start communication with the specified LonWorks network. |
4 |
STOPNETWORK |
Stop communication with the specified LonWorks network. |
|
|
Return: 1 if OK, else 0 |
Syntax 3
IntVal = LONWORKS(Mode, CommObjectName);
Return type: INTEGER.
Execution
Mode |
Mnemonic |
Action |
5 |
STARTNODE |
Start communication with the specified LonWorks node. |
6 |
STOPNODE |
Stop communication with the specified LonWorks node. |
|
|
Return: 1 if OK, else 0 |
Syntax 6
IntVal = LONWORKS(Mode, CommObjectName, MsgCode, MsgData [, ResultVar]);
Return type: INTEGER.
Argument |
Meaning |
MsgCode |
A code for the message to be sent. It is a character string in hexadecimal format, with a value between 00 and FF inclusive. |
MsgData |
Data to be sent in the message. It is a character string in hexadecimal format, in which each pair of characters corresponds to one byte (values 00 to FF). Maximum length 1024 characters. |
ResultVar |
Result variable (optional): 0: Message being sent. 1: Message sent successfully. 2: Sending failed. |
Execution
Mode |
Mnemonic |
Action |
9 |
SENDMESSAGE |
This mode enables a message to be sent to the node specified by CommObjectName. |
|
|
Return: 0 Message sent. -1 Incorrect syntax for CommObjectName. -2 Incorrect syntax for MsgCode. -3 Incorrect syntax for MsgData. -4 ResultVar does not exist or is not a register variable. |