Write, Read, and Print to Console Virtual Datapoints

console("------ TEST BEGINS @ " + new Date().toString() + " ------")

 

executePropertyCommand("System1.ApplicationView:ApplicationView.Logics.VirtualObjects.vd_analog","Value","Write", -300.018)

var vdAnalogRead = read("System1.ApplicationView:ApplicationView.Logics.VirtualObjects.vd_analog","Value")

console("Global Variable Analog =" + vdAnalogRead.value.displayValue)

 

executePropertyCommand("System1.ApplicationView:ApplicationView.Logics.VirtualObjects.vd_binary","Value", "Write", "false")

var vdBinaryRead = read("System1.ApplicationView:ApplicationView.Logics.VirtualObjects.vd_binary","Value")

console("Global Variable Binary =" + vdBinaryRead.value.displayValue)

 

executePropertyCommand("System1.ApplicationView:ApplicationView.Logics.VirtualObjects.vd_bitstring","Value","Write", 15)

var vdBitstringRead = read("System1.ApplicationView:ApplicationView.Logics.VirtualObjects.vd_bitstring","Value")

console("Global Variable Bitstring =" + vdBitstringRead.value.displayValue)

 

executePropertyCommand("System1.ApplicationView:ApplicationView.Logics.VirtualObjects.vd_combination","FloatValue","Write", 455.75)

var vdCombinationRead = read("System1.ApplicationView:ApplicationView.Logics.VirtualObjects.vd_combination","FloatValue")

console("Global Variable Combination =" + vdCombinationRead.value.displayValue)

 

executePropertyCommand("System1.ApplicationView:ApplicationView.Logics.VirtualObjects.vd_datetime", "Value", "Write", Date.now())

var vdDateTimeRead = read("System1.ApplicationView:ApplicationView.Logics.VirtualObjects.vd_datetime","Value")

console("Global Variable Date & Time =" + vdDateTimeRead.value.displayValue)

 

executePropertyCommand("System1.ApplicationView:ApplicationView.Logics.VirtualObjects.vd_duration","Value", "Write", 567)

var vdDurationRead = read("System1.ApplicationView:ApplicationView.Logics.VirtualObjects.vd_duration","Value")

console("Global Variable Duration =" + dDurationRead.value.displayValue)

 

executePropertyCommand("System1.ApplicationView:ApplicationView.Logics.VirtualObjects.vd_integer","Value", "Write", 18)

var vdIntegerRead = read("System1.ApplicationView:ApplicationView.Logics.VirtualObjects.vd_integer", "Value")

console("Global Variable Integer =" + vdIntegerRead.value.displayValue)

 

executePropertyCommand("System1.ApplicationView:ApplicationView.Logics.VirtualObjects.vd_multistate","Value","Write", 1);

var vdMultistateRead = read("System1.ApplicationView:ApplicationView.Logics.VirtualObjects.vd_multistate", "Value")

console("Global Variable Multistate =" + vdMultistateRead.value.displayValue)

 

executePropertyCommand("System1.ApplicationView:ApplicationView.Logics.VirtualObjects.vd_string","Value","Write", "ciao")

var vdStringRead = read("System1.ApplicationView:ApplicationView.Logics.VirtualObjects.vd_string", "Value")

console("Global Variable String =" + vdStringRead.value.displayValue)

 

executePropertyCommand("System1.ApplicationView:ApplicationView.Logics.VirtualObjects.vd_unsigned", "Value", "Write", 2)

var vdUnsignedRead = read("System1.ApplicationView:ApplicationView.Logics.VirtualObjects.vd_unsigned", "Value")

console("Global Variable Unsigned =" + vdUnsignedRead.value.displayValue)

 

console("------ TEST ENDS @ " + new Date().toString() + " ------")