Event Handler

Top  Previous  Next

This demonstrates how to call a Phidgets event and how to use them.

 

For illustration purposes, Phidget Spatial will be used.

 

 

 

 

clip0001

Note: For a more specific illustration on different phidgets, users can refer to different examples accordingly.

Open the diagram of the "Spatial event example.vi" under the "Spatial" folder.

 

 

 

 

 

Phidgets Event can be programmed into 3 steps:

 

 

<Step1> Create an event handler.

 

 

<Step2> Perform any event execution related with the Phidget.

 

 

<Step3> Close the related event.

 

 

clip0001

Note: When execute an event, please make sure "create", "execute" and "close" the same event. For example, user wants to run an Event called A. He has to place "CreateEventA.vi", "ExeEventA.vi" and "CloseEventA.vi" on the block diagram. He cannot place "CloseEventB.vi" instead of "CloseEventA.vi". However, for some Phidgets event, they share same VIs. (For more details, please refer to specific Phidgets.)

 

 

 

 

Phidget Error Event:

 

Another useful example will be "Temp On Error.vi" under "TemperatureSensor" folder.

 

In this example, the error event is actually located in "Common Functions" folder. It will detect asynchronous errors from Phidgets.

 

 

 

 

 

clip0001

Note: Phidgets can also support multiple events. For an example, please refer to "Event handler example.vi" under the "InterfaceKit" folder.