On VB interface you can make SET dan RESET button and Temporary Push Button to commuicate with OMRON PLC, please make VB interface below:

Then Write Source code below
Dim data 'General Declaration
Private Sub kirim()
Dat$ = data
l = Len(Dat$)
A = 0
For I = 1 To l
Opo$ = Mid$(Dat$, I, 1)
A = Asc(Opo$) Xor A
Next I

Then Write Source code below
Dim data 'General Declaration
Private Sub kirim()
Dat$ = data
l = Len(Dat$)
A = 0
For I = 1 To l
Opo$ = Mid$(Dat$, I, 1)
A = Asc(Opo$) Xor A
Next I
No comments:
Post a Comment