Eric-Klaasen
Member
When I try to write a PIW to a simulated PLC in PLCSIM, I get a Data Type Error.
Code:
___________________________________________________________________
Sub WriteInputWordImage(ByVal lStartIndex As Long, ByVal vData As Integer)
Dim errInputWordImage As Long
errInputWordImage = AxS7ProSim1.WriteInputImage(lStartIndex, vData)
If errInputWordImage = S_OK Then
'MsgBox(MSG_OK, vbInformation, "S7ProSim Example")
Else
ShowError(errInputWordImage)
End If
End Sub
_________________________________________________________________
Can anyone help me?
The sample in the manuals specify that data type should be "variant", I tried "Object" but that did not work.
Code:
___________________________________________________________________
Sub WriteInputWordImage(ByVal lStartIndex As Long, ByVal vData As Integer)
Dim errInputWordImage As Long
errInputWordImage = AxS7ProSim1.WriteInputImage(lStartIndex, vData)
If errInputWordImage = S_OK Then
'MsgBox(MSG_OK, vbInformation, "S7ProSim Example")
Else
ShowError(errInputWordImage)
End If
End Sub
_________________________________________________________________
Can anyone help me?
The sample in the manuals specify that data type should be "variant", I tried "Object" but that did not work.