Loading...
 
4D Systems Supporting Files
Designed to provide useful information showcasing the spectrum of features that 4D products have to
offer, through easy to read documentation supported by illustrative images and sample code extracts.

ViSi-Genie Magic Button Counters

Name : 4D-AN-00159
Title : ViSi-Genie Magic Button Counters
Revision : 1.01
Description : In the past it was not possible to create button counters in ViSi-Genie. With Workshop 4 Pro this is now possible with the use of the Magic Event object. The Magic Event object is under the Genie Magic pane in Workshop 4 Pro. It contains a 4DGL code and it can be linked to standard Genie objects such as a winbutton, such that any time that the button is touched, the Magic Event object is called (or the 4DGL code is executed). The Magic Event object may have a counter variable, the incrementing or decrementing value of which can be used to set the frame value of other objects (a LED digits object for instance). The value can also be sent to an external host.

This application note primarily shows how the Magic Event object is used to implement a project that features up and down button counters. The implementation of up and down button counters further requires the use of the following features and functions in combination with the Magic Event object:

 SendReport(…)
 WriteObject(…)
 Timers and timer events

SendReport(…) and WriteObject(…) are examples of callable functions in the new ViSi-Genie Communications protocol.

SendReport(…) causes the program to send a REPORT_EVENT or a REPORT_OBJ message to the serial port. This function can be inserted into the code of Genie Magic objects.

WriteObject(…) updates the values of Genie objects. This function can also be inserted into the code of Genie Magic objects.

Timers and timer events are features and functionalities in 4DGL programming. These are needed in the implementation of up and down button counters.
Link : http://www.4dsystems.com.au/appnote/4D-AN-00159/
Supported Processor : PICASO, DIABLO16
Supported Environment : ViSi-Genie
Subcategory : genie-magic
Files :
Difficulty : Medium
Recommendation(s) :
Title Difficulty
General How to Update the PmmC for Diablo16 Easy
General Migrating from PICASO-SGC-GFX to PICASO Easy
General How to Update the PmmC for Picaso Easy
General Partitioning a micro-SD into FAT and RAW Components Easy
ViSi-Genie Getting Started - First Project for Picaso Display Modules Easy
ViSi-Genie Getting Started - First Project for Diablo16 Display Modules Easy
ViSi-Genie onChanging and onChanged Events Easy
ViSi-Genie Advanced Buttons Medium
ViSi-Genie Digital Displays Medium
ViSi-Genie Labels, Text, and Strings Medium
ViSi-Genie How to Add Magic Objects Medium