SENDLIST

Concept Link IconSee also

Send a list of commands and set-points to a field device as would a recipe.

WebVue support - Yes.

This instruction, used in conjunction with the instruction SET, is designed to optimize the use of control services according to the data acquisition driver capabilities (OPC, Modbus...) as a recipe does.

The instruction SET allows adding an I/O variable and its command value (value to send) to a list hold in memory. Once the list of commands to perform is complete, you can execute it using the instruction SENDLIST.

The list of commands hold in memory is protected at the user session level, e.g. each user session benefits from its own list, and calls to SET or SENDLIST in one given user session do not affect the lists associated to other sessions.

See the topic Message exchange mechanisms in PcVue for more information.

Mode

Mnemonic

Syntax

0 BLOC 1
1 MULTIPLE 1

Syntax 1

IntVal = SENDLIST(Mode[, VarName[, OPCMode]]);

Return type: INTEGER.

Argument

Meaning

VarName

The name of a register variable with the control attribute set. It cannot be used elsewhere in the program. Type STR.

 

It will contain the status of the sending progress:

0 Sending in progress
1 Sending completed successfully
2 Sending failed

OPCMode

The sending mode for when the source of the variable is OPC.

0 Optimized serialization (default).
1 Full serialization.
2 No optimization.
3 Full optimization.

Execution

See the topic SENDLIST send mode for an explanation of the execution.

Return (for both modes): 1 if successful, else 0.

To be set, variables must have the Command attribute enabled.

Examples

Dim strVar as STR;

 

strVar = "BR1.VAL";

'note NOT "@BR1.VAL"

SET(strVar,12);

SENDLIST("BLOC");

SUB Main()

i1 = SET ("Register1",600,);

'address AP of Register 1 : S1

i1 = SET ("Register2",700,);

'address AP of Register 1 : S2

i1 = SET ("Register3",500,);

'address AP of Register 1 : S5

i1 = SET ("Register4",400,);

'address AP of Register 1 : S6

i1 = SET ("Register5",300,);

'address AP of Register 1 : S7

SENDLIST ("BLOC"); 'Send a frame, writing words S1 to S7

' (S3 and S4 will be written with their current values)

END SUB