Show/Hide hidden text
This chapter gives an overview of the events that are raised by a Phidgets Spatial 3/3/3 device and that can be used in the Event Listener.
Please read the chapters "Phidgets - Spatial 3/3/3" and "Event Listener" if you would like to know how to add and use both. The available members that can be used in our scripting language are explained in the chapter "Phidgets - Spatial 3/3/3 Members".
Example:
BarGraph4.Value = y
This event is raised whenever the registered acceleration of the Phidgets_Spatial_3_3_3_1 device changes.
The event returns three parameters to WD which are named "x", "y" and "z", and represent the measured acceleration value in each of the three directions, the unit is g.
If you select this event and copy the example into the scripting field of the Event Listener, the Widget Designer BarGraph with ID 4 will be assigned with the same value as the acceleration value in y-direction from the Phidgets device.
|
Example:
Gauge4.Value = bearing
This event is raised whenever the Phidgets_Spatial_3_3_3_1 device registers a change in the surrounding magnetic field.
The event returns six parameters to WD. The first three are named "x", "y" and "z", and hold double values representing the strengths of the magnetic field in each of the three directions, the unit is Gauss (G).
The following three parameters, "pitch", "roll" and "bearing" hold the rotational angles of the device within the surrounding magnetic field as double values in degrees (°).
If you select this event and copy the example into the scripting field of the Event Listener, the Widget Designer Gauge with ID 4 will be assigned with the same value as the bearing value from the Phidgets device and indicates its current orientation in the x/y-plane.
|
Example:
BarGraph4.Value = y
This event is raised whenever the gyroscope of the Phidgets_Spatial_3_3_3_1 device detects a changes.
The event returns three parameters to WD which are named "x", "y" and "z", and represent the measured angular velocity value in each of the three planes, the unit is degrees per second (°/s).
If you select this event and copy the example into the scripting field of the Event Listener, the Widget Designer BarGraph with ID 4 will be assigned with the same value as the velocity value in y-plane from the Phidgets device.
|
Example:
Label1.Text = isConnected
This event is raised whenever the connection state changes from disconnected to connected or vice versa.
The event returns one parameter to WD which is a Boolean value with the name "isConnected" and holds either "True" or "False".
If you select this event and copy the example into the scripting field of the Event Listener, it will write "True" or "False" into the Label with ID 1 whenever the device dis-/connects.
|
Example:
Label1.StartFlash
This event is raised whenever one or more of the most recent values the device has measured are outside the sensor's valid range.
The event does not return any parameters for the associated script.
If you select this event and copy the example into the scripting field of the Event Listener, Label with ID 1, will start flashing to draw attention on the detected movement being too fast.
|