About this plugin
This plugin for NeoBook is a wrapper over the DLL for the Velleman Recorder/Logger K8047 & PCS10 cards. The plugin allows you to use all the exported functions from this DLL and therefore communicate your publications with this kind of hardware.
The plugin include a complete sample publication which use all the provided actions. Of course remember you need to have the appropiate model of the Velleman card attached to your computer in order to try this plugin and the provided sample.
Thirparty
This plugin are imposible without the aid of this people:
Thanks a lot!
Opens a link to the Recorder/Logger device. Initializes the communication routines for the K8047 unit. Loads the drivers needed to communicate via the USB port. This procedure must be performed in the beginning of the publication. The result variable store "True" if every is OK, or "False" if not. In this last case the [LastError] variable contain information about the error.
Closes the link to the device. Unloads the communication routines for K8047 unit and unloads the drivers needed to communicate via the USB port. This is the last action of the application program before termination. The result variable store "True" if every is OK, or "False" if not. In this last case the [LastError] variable contain information about the error.
Reads the timer counter status and the A/D data from the K8047 to a buffer in the application program. The timer counter is incremented every 10ms. The new data from the A/D converter channels 1...4 is updated every time the timer counter is incremented.
The result variable is used for prefixed certain variables which contain the readed data. For example, supose you call this action using "[Data]" for the result variable. Then the variables refered below are filled with the read data:
The result can also store "False" if an error occur. In this last case the [LastError] variable contain information about the error.
Sets the input amplifier gain of selected channel 1...4. Gain values 1, 2, 5 and 10 are the only valid values. Selects one of the input amplifier hardware pre-selected gain settings. The corresponding full scale (A/D output 255) volteges are following:
The result variable store "True" if every is OK, or "False" if not. In this last case the [LastError] variable contain information about the error.
Turns the Record LED on. The result variable store "True" if every is OK, or "False" if not. In this last case the [LastError] variable contain information about the error.
Turns the Record LED off. The result variable store "True" if every is OK, or "False" if not. In this last case the [LastError] variable contain information about the error.
All the NeoPlugins deal with errors in the same way that NeoBook does: when the plugin found an action error the [LastError] variable store information about the error, so you can take care about this variable when execute an action.
But all the NeoPlugins also incorporate an advanced way to deal with possible action errors. You can define a subroutine named OnNeoPluginActionError in order to be executed when some action error are found and you can use this variables inside:
Note that this error handling subroutine are shared for all the NeoPlugins, so you no need to specify a subroutine for every plugin you use in your publication because the same subroutine are recognized and automagically used by every NeoPlugin. Below you can view a sample of this subroutine code:
:OnNeoPluginActionError AlertBox "NeoPlugin Error" "Error [LastError] in plugin: [PluginName]" Return
Also note that the use of this NeoPlugins error handling subroutine is completelly optional. You can continue using the [LastError] variable as usual and even use the both methods at the same time.