OnlineVariable.WriteBack



WriteBack() As Boolean
ED
not used
RT
avaliable

Remarks

This method writes all values of the requested buffer with the bit writing operation active back to the driver.

Before using this method execute SetMemCfg. This method was created for external performance-critical applications. zenOn creates structures in the shared memory area, defined by SetMemCfg. zenOn must get a Mutex object of the external application, as both run in different threads.

Now the external application can read and modify the structures of the current values. The structure is as follows: struct shmemval


{
BYTE	bFlags; 	 // Bit0=von zenOn geändert, Bit1=extern
									// geändert
  DWORD	 dwStatus;  // Statuswort bitcodiert (gestört, Hand, etc.)
  DWORD	 dwTimestamp; // Zeitstempel in s seit 1.1.1970 00:00 GMT
  union
  {
	BYTE	bBool; 	// numerischer Rohwert (0=FALSE, 0xFF=TRUE)
	BYTE	bByte; 	// numerischer Rohwert INT_8  oder UINT_8
	WORD	wWord; 	// numerischer Rohwert INT_16 oder UINT_16
	DWORD   dwDWord; 	// numerischer Rohwert INT_32 oder UINT_32
	float   fFloat; 	 // numerischer Rohwert IEEE single
	double  dDouble; 	// numerischer Rohwert IEEE double
	double  dNumerical; 			 // numerischer Wert normiert 
	char	csString[64];   // alphanumerischer Wert
  } Value;
};

The external application must set the parameter bFlags to 1. Thereby the current structure is marked as changed on calling this method. So the control system updates the value in the driver.

See Also

OnlineVariable