Tinsukou Posted March 8, 2011 Report Posted March 8, 2011 Hi, I can't change FS time my code... Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim zmin As Offset(Of Byte()) = New FSUIPC.Offset(Of Byte())("time", &H23C, 1) Dim zhour As Offset(Of Byte()) = New FSUIPC.Offset(Of Byte())("time", &H23B, 1) Dim second As Offset(Of Byte()) = New FSUIPC.Offset(Of Byte())("time", &H23A, 1) Dim hour As Offset(Of Byte()) = New FSUIPC.Offset(Of Byte())("time", &H238, 1) Dim min As Offset(Of Byte()) = New FSUIPC.Offset(Of Byte())("time", &H239, 1) FSUIPCConnection.Process("time") zhour.Value(0) = 10 ' JST(+9) hour.Value(0) = 19 zmin.Value(0) = 10 min.Value(0) = 10 second.Value(0) = 10 FSUIPCConnection.Process("time") End Sub Please give me sample.... Tinsukou
Paul Henty Posted March 8, 2011 Report Posted March 8, 2011 Hello Tinsukou, You don't need to use arrays here, just use 'Byte's. Also call the process() after assigning the values to the time offsets: Dim zmin As Offset(Of Byte) = New FSUIPC.Offset(Of Byte)("time", &H23C) Dim zhour As Offset(Of Byte) = New FSUIPC.Offset(Of Byte)("time", &H23B) Dim second As Offset(Of Byte) = New FSUIPC.Offset(Of Byte)("time", &H23A) Dim hour As Offset(Of Byte) = New FSUIPC.Offset(Of Byte)("time", &H238) Dim min As Offset(Of Byte) = New FSUIPC.Offset(Of Byte)("time", &H239) Private Sub btnSetTime_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSetLocalTime.Click ' set Local time to 20:33:05 hour.Value = 20 min.Value = 33 second.Value = 5 FSUIPCConnection.Process("time") ' OR set UTC (zulu) time to to 20:33:05 'zhour.Value = 20 'zmin.Value = 33 'second.Value = 5 'FSUIPCConnection.Process("time") End Sub Paul
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now