« Back to Product

Documentation

S7_Write

 boolean S7_Write (int $InstanceID, float $Value) 

Parameters

InstanceID

ID of the device to be switched

Value

32-bit floating point value according to IEEE754 or integer

Returns

If the command succeeds, it returns TRUE, otherwise FALSE.

Description

Writes the value Value to the configured address of the instance with the ID InstanceID without knowing the exact data type.

Warning

This function also supports setting values when a factor has been set.

Warning

This function cannot be used for bit values. S7_WriteBit must be used for bit values.

Example

// Float value
S7_Write(12345, 23.5);

// Integer
S7_Write(12345, 123);
Any questions?