.

Controller.MemorySet

Sets the controller memory location specified by the address string argument to newValue.

Overload 1 assumes the default data type for the controller memory location.

Overload 2 has a third argument which specifies the data type for the data to be written to the controller.

Version History

Introduced in MPX 2.0.

Result

Void

Arguments

Overload 1

 
Argument Type Description
newValue
Double
The value to write to the controller.
Address
String
The controller memory location to set. This string can be obtained from the VM3 application.

Overload 2

 
Argument Type Description
newValue
Double
The value to write to the controller.
Address
String
The controller memory location to set. This string can be obtained from the VM3 application.
dataType
Mpx.DataType
The data type to be used to write newValue to the controller.

 

Visual Basic

Syntax

Sub MemorySet(newValue As Double, address As String)

Sub MemorySet(newValue As Double, address As String, dataType As Mpx.DataType)

Sample Code

 
' Map.UserBuffer enumeration takes 1 additional index,
' the index of the user buffer
Dim addressString As String = controller.Map.StringGet(Mpx.Map.UserBuffer, 0)

controller.MemorySet(17, addressString)


Sample Application

 

C#

Syntax

void MemorySet(double newValue, string address);

void MemorySet(double newValue, string address, Mpx.DataType dataType);

Sample Code

 
// Map.UserBuffer enumeration takes 1 additional index,
// the index of the user buffer
string addressString = controller.Map.StringGet(Mpx.Map.UserBuffer, 0);

controller.MemorySet(17, addressString);

 

See Also

MemoryGet

Enumerations
DataType

Applications
VM3

 

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2021 Motion Engineering