EasyManua.ls Logo

PoKeys 57E - Example Script; On and off at a Rate of 1 Hz)

Default Icon
36 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
PoKeys Pulse engine v2 documentation
28
www.poscope.com
Return - Return of 0 if there are no faults, 1 is returned if he pin is not found , 2 is returned if the pin
is an output pin.
Example script (finds the PoKeys device with the serial number 25000, then toggles the IO 1
on and off at a rate of 1 Hz):
Sub Main()
DevName = "PoKeys_25000"
Outputnumber = 1
DevID = -1
Do
DevID = DevID+1
SearchName = GetIODevName(DevID)'Search for the Device
If(SearchName = "NoDevice") Then
MsgBox ("Error Finding Device")
Exit Sub
End If
Loop While (DevName <> SearchName)
For d=0 To 60'Loop 60 times to toggle the output on and off for one min
r = SetIODevOutput(DevID,Outputnumber,1)'Activate the output
If(r<>0) Then
MsgBox("Output#" & Outputnumber & " " & GetIODevIOName(DevID,Outputnumber) & " is Not
an
output" )
Exit Sub
End If
Sleep(500) 'Wait .5 sec
SetIODevOutput(DevID,Outputnumber,0)'Turn the output off
Sleep(500)'Wait .5 sec
Next d
End Sub
Main

Related product manuals