-
Notifications
You must be signed in to change notification settings - Fork 0
EventCounter_versatile1
This component is used to count events and present the count at the data output [Out]cnt. This is a more versatile version of the basic counter and can be incremented when the input event [In]inc is asserted or decremented when the input event [In]dec is asserted. A maximum and minimum threshold can be set by specifying the parameters Max. Threshold and Min. Threshold or by overriding the parameters by presenting values to the data inputs [In]max and [In]min respectively. Note that if a value of 0 is used for the Max. Threshold parameter then the Max. Threshold is set to 2147483647, which is the maximum permissible value.
An initial value for the count can be set by presenting a value to the data input [In]ini, if the port is not connected the Initial Value parameter value is used. Similarly a step size for each increment or decrement event can be set by presenting a value to the data input [In]step, if the port is not connected the Step Size parameter value is used. Note that the minimum step size is 1.
The [In]enable and [In]disable event inputs can be used to enable and disable the counter, meaning that the count will be incremented or decremented if and only if the counter is enabled. The [In]rst event input is used to reset the count to its initial value.
If the count exceeds the upper threshold then the overflow output event [Out]ovf is triggered, similarly if the count exceeds the lower threshold then the overflow output event [Out]ovf is triggered. If and only if the count does not exceed the thresholds when an increment or decrement event is asserted, then the corresponding output event will be triggered and the count value will be presented to the data output [Out]cnt.
The count will always be inside the bounds of the minimum and maximum thresholds. For example if the initial value is set to be greater than the maximum threshold, then the initial value will be capped at the maximum threshold, the same holds true for an initial value that is less than the minimum threshold.
At each increment, the count is only incremented if the sum of count value and the step size is less than or equal to the maximum threshold. The same rule applies to decrement events with respect to the minimum threshold. For example if the step size is 3, the count is 8 and the maximum threshold is 10, then on the next increment event the count will remain on 8 and the output event [Out]ovf will be triggered. If the step size is 2, the count is 8 and the maximum threshold is 10, then on the next increment event the count will incremented to 10 and the input event [In]inc will be triggered and a value of 10 presented to the data output [Out]cnt.
If the values presented to either of the data inputs [In]max or [In]min change then the new thresholds will be used on the next increment, decrement or reset events. If the value of the counter is greater than the new maximum threshold then the counter will be set to the maximum threshold and similarly if the the counter is less than the new minimum threshold then the counter will be set to the minimum threshold. Note that the counter value is changed to be within the new thresholds before the increment or decrement of its value. For example when the input event [In]inc is triggerred, if the counter value is below the new minimum threshold it will be set to the new minimum threshold and before its value is incremented and presented to the data output [Out]cnt.
| name | type | default | min. | max. | description |
|---|---|---|---|---|---|
| Enable at Init | Boolean | 1 |
|
|
Enable the counter at initialisation time if TRUE, else counter is disabled at initialisation time. |
| Initial Value | Integer | 0 | -2147483648 | 2147483647 | Initial Value for count. |
| Step Size | Integer | 1 | 1 | 2147483647 | Value incremented/decremented on each count. |
| Max. Threshold | Integer | 1000 | -2147483648 | 2147483647 | Threshold value for ovf event. |
| Min. Threshold | Integer | 0 | -2147483648 | 2147483647 | Threshold value for ovf event. |
| In Ev. |
|
|---|---|
| rstc | Input event, resets the count to its intial value. |
| inc | Input event, triggers an increment of the counter and presents the count to the data output [Out]cnt |
| dec | Input event, triggers an decrement of the counter and presents the count to the data output [Out]cnt. |
| enable | Input event, the counter will register increment or decrement events after this event is triggered. |
| disable | Input event, the counter will not register increment or decrement events after this event is triggered. |
| Data In |
|
| ini | Data input, the initial value for the counter. Overrides the parameter Initial Value. |
| step | Data input, the value by which the count is incremented or decremented by. Overrides the parameter Step Size. |
| max | Data input, the maximum threshold for the counter. Overrides the parameter Max. Threshold. |
| min | Data input, the minimum threshold for the counter. Overrides the parameter Min. Threshold. |
| Data Out |
|
| cnt | Data output, the current count. |
| Out Ev. |
|
| Output event, is asserted if and only if an increment event is received and the count is less than the maximum threshold. | |
| Output event, is asserted if and only if a decrement event is received and the count is greater than the minimum threshold. | |
| Output event, is asserted if and only if a decrement event is received and the count is greater than the minimum threshold. | |
| Output event. | |
| Output event. | |
| Output event. | |
| ovf | Output event, is asserted if and only if an increment event is received and the count is equal to or greater than the maximum threshold. |
| inc | Asserted if and only if an increment event is received and the count is less than the maximum threshold. |
| State Machine | None | |
|
||||
| Toolbox | Core | Version | v1.0. | ||||
| Licence Type | MPL2.0 | Component Supplier | inx ltd. | ||||
| Minumum DCC | A0000 | Profiles | All. | ||||
copyright inx limited, UK, 2025 - join the inxware community @appland
- event_identifier - Registers which input event was last asserted as an index integer
- event_switch - Asserts different events based index integer
- event_text_switch - Asserts events conditioned on string LUT matches.
- EventCounter_versatile1 - Counts events (up and down, with overflow detection)
- trigger_counter - Simple EventCounter
- trigger_eventor2 - Combines all event paths and passes all events through unconditionally
- trigger_eventand2 - Waits for all events to be asserted
- trigger_eventManRstAnd1 - Waits for all events to be asserted and requires a reset event to before retriggering again.
- trigger_eventrstand2 - Waits for all events to be asserted and requires a reset event to before retriggering again.
- trigger_eventboolctrl - passes events through conditional on a Boolean value.
- trigger_eventsetrstbool - Sets and unsets a Boolean depending on event inputs
- trigger_eventtoggbool - Toggles a Boolean value on each inout event.
- trigger_negedgedetect - Asserts events on negative edge of a Boolean value change
- trigger_posedgedetect - Asserts events on positive edge of a Boolean value change
- trigger_eventedgedetect - Asserts events when a Boolean value changes
- STATE - Represents a State in Lucid
- state_condition - Event driven state condition --> transition and actions
- state_debug - To debug state machines this function block is required.
- state_manager - Each state machine is defined by a State Manager
- ArrayBool1 - Array of Boolean Values
- ArrayInt1 - Array Integer Values
- ArrayReal1 - Array of Real Values
- ArrayString1 - Array of String Values
- buffer_fifobbq - FIFO Boolean
- buffer_fifoiiq - FIFO Integer
- buffer_fiforrq - FIFO Real
- buffer_fifossq - FIFO String
- buffer_lifobbq - LIFO Boolean
- buffer_lifoiiq - LIFO Integer
- buffer_liforrq - LIFO Real
- buffer_lifossq - LIFO String
- const_b1 - Boolean Constant
- const_i1 - Integer Constant
- const_r1 - Real Constant
- const_s1 - String Constant
- convertor_tranbix - Converts Bool to Int
- convertor_tranbrx - Converts Bool to Real
- convertor_tranbsx - Converts Int to Bool
- convertor_tranibx - Converts Int to Bool
- convertor_tranirx - Converts Int to Real
- convertor_tranisx - Converts Int to String
- convertor_tranrbx - Converts Real to Bool
- convertor_tranrix - Converts Real to Int
- convertor_tranrsx - Converts Real to String
- convertor_transbx - Converts String to Bool
- convertor_transix - Converts String to Int
- convertor_transrx - Converts String to Real
- logic_and2bbx - Two Input And
- logic_and3bbx - Three Input And
- logic_and4bbx - Four Input And
- logic_nand2bbx - Two Input Nand
- logic_nand3bbx - Three Input Nand
- logic_nand4bbx - Four Input Nand
- logic_nor2bbx - Two Input Nor
- logic_nor3bbx - Three Input Nor
- logic_nor4bbx - Four Input Nor
- logic_notbbx - Not
- logic_or2bbx - Two Input Or
- logic_or3bbx - Three Input Or
- logic_or4bbx - Four Input Or
- logic_xorbbx - Two Input Xor
- calc2_i1 - Single variable expression
- calc2_i2 - 2 variable expression
- calc2_i4 - 4 variable expression
- calc2_i6 - 6 variable expression
- calc2_i8 - 8 variable expression
- operator_absix - AbsoluteInt
- operator_add2ix - AdditionTwo Input Int
- operator_add2rx - AdditionTwo Input Real
- operator_addacci - AddAccumulateInt
- operator_addaccr - AddAccumulateReal
- operator_divix - DivisionInt
- operator_divrx - DivisionReal
- operator_max - Max_Int
- operator_min - Min_Int
- operator_modix - ModulusInt
- operator_modrx - ModulusReal
- operator_mul2ix - MultiplyTwo Input Int
- operator_mul2rx - MultiplyTwo Input Real
- operator_mul3ix - MultiplyThree Input Int
- operator_mul3rx - MultiplyThree Input Real
- operator_mul4ix - MultiplyFour Input Int
- operator_mul4rx - MultiplyFour Input Real
- operator_powix - PowerInt
- operator_powrx - PowerReal
- integrator - Integrator_Int
- integrator_r - Integrator_Real
- operator_cmeibx - operator_cmeibx
- operator_cmeibx1 - ComparatorGreaterEqualInt1
- operator_cmerbx - operator_cmerbx
- operator_cmerbx1 - ComparatorGreaterEqualReal1
- operator_cmpibx - operator_cmpibx
- operator_cmpibx1 - ComparatorGreaterInt1
- operator_cmprbx - operator_cmprbx
- operator_cmprbx1 - ComparatorGreaterReal1
- operator_equibx - operator_equibx
- operator_equibx1 - ComparatorEqualInt1
- operator_equrbx - operator_equrbx
- operator_equrbx1 - ComparatorEqualReal1
- operator_asinhrx - ArcHyperbolicSineReal
- operator_asinrx - ArcSineReal
- operator_atanhrx - ArcHyperbolicTanReal
- operator_atanrx - ArcTanReal
- operator_coshrx - operator_coshrx
- operator_cosrx - CosineReal
- operator_acoshrx - ArcHyperbolicCosineReal
- operator_acosrx - ArcCosineReal
- operator_exprx - ExponentialReal
- operator_log10rx - LogBaseTenReal
- operator_logrx - LogReal
- operator_sqrix - SquareInt
- operator_sqrrx - SquareReal
- operator_sqrtrx - SquareRootReal
- operator_subacci - SubAccumulateInt
- operator_subaccr - SubAccumulateReal
- operator_subix - SubtractionInt
- operator_subrx - SubtractionReal
- operator_tanhrx - HyperbolicTanReal
- operator_tanrx - TanReal
- indexed_mux_int - Indexed Mux Int
- indexed_mux_str - Indexed Mux String
- map_int - Map Int
- mux_1b - mux_1b
- mux_1i - mux_1i
- mux_1r - mux_1r
- mux_1s - mux_1s
- mux_2b - MultiplexTwo Input Bool
- mux_2i - MultiplexTwo Input Int
- mux_2r - MultiplexTwo Input Real
- mux_2s - MultiplexTwo Input String
- mux_3b - MultiplexThree Input Bool
- mux_3i - MultiplexThree Input Int
- mux_3r - MultiplexThree Input Real
- mux_3s - MultiplexThree Input String
- mux_4b - MultiplexFour Input Bool
- mux_4i - MultiplexFour Input Int
- mux_4r - MultiplexFour Input Real
- mux_4s - MultiplexFour Input String
- mux_8b - 8-Input Indexed Boolean Multiplexer Function Block
- mux_8i - 8-Input Indexed Integer Multiplexer Function Block
- mux_8r - 8-Input Real Number Multiplexer Function Block
- mux_8s - Number Multiplexer Function Block
- num_mux - Numeric Multiplexer Function Block
- binary2decimal8 - binary2decimal8
- cgi2json - cgi2json Function Block
- hex2string - Hex String to String Conversion Function Block
- int2HexString - Int2HexString Function Block
- json_stream - JSON Stream Parser Function Block
- JSONObjectFunctionBlock - JSON Object
- key_value - Key Value Pair
- sample2string - Samples to String
- xml_stream - XML Stream
- database - database
- inx-permanent_storage_bool - inx-permanent_storage_bool
- inx-permanent_storage_int - inx-permanent_storage_int
- inx-permanent_storage_real - inx-permanent_storage_real
- inx-permanent_storage_string - inx-permanent_storage_string
- demux_2b - DemultiplexTwoOutputBool
- demux_2i - DemultiplexTwoOutputInt
- demux_2r - DemultiplexTwoOutputReal
- demux_2s - DemultiplexTwoOutputString
- demux_3b - DemultiplexThreeOutputBool
- demux_3i - DemultiplexThreeOutputInt
- demux_3r - DemultiplexThreeOutputReal
- demux_3s - DemultiplexThreeOutputString
- demux_4b - DemultiplexFourOutputBool
- demux_4i - DemultiplexFourOutputInt
- demux_4r - DemultiplexFourOutputReal
- demux_4s - DemultiplexFourOutputString
- demux_8b - 8-Output Boolean Demultiplexer Function Block
- demux_8i - 8-Output Indexed Integer Demultiplexer Function Block
- demux_8r - 8-Output Real Number Demultiplexer Function Block
- demux_8s - 8-Output String Demultiplexer Function Block
- demux_8indexedb - IndexedDemultiplexer_Bool
- demux_8indexedi - IndexedDemultiplexer_Int
- demux_8indexedr - IndexedDemultiplexer_Real
- demux_8indexeds - IndexedDemultiplexer_String
- indexed_demux_int - Indexed Demux Int
- num_demux - Numeric Demultiplexer Function Block
- string_divider - String Divider
- string_subs - SubString
- stringfn_cats - CatString
- stringfn_charats - CharAtString
- stringfn_cmps - CmpString
- stringfn_finds - FindString
- stringfn_formats - string_format_2
- stringfn_formats8 - string_format_8
- stringfn_inserts - InsertString
- stringfn_lens - LenString
- stringfn_lwrs - to LowerString
- stringfn_scanf8 - string_scanf
- stringfn_strats - StrAtString
- stringfn_uprs - to UpperString
- file_rob - FILE_ReadOnly_Bool
- file_roi - FILE_ReadOnly_Int
- file_ror - FILE_ReadOnly_Real
- file_ros - FILE_ReadOnly_String
- file_wob - FILE_WriteOnly_Bool
- file_woi - FILE_WriteOnly_Int
- file_wor - FILE_WriteOnly_Real
- file_wos - FILE_WriteOnly_String
- fs_dir_create_remove - FileSystemDirCreateRemove
- fs_dir_list - FileSystemDirList1
- adc_read - adc_read
- dac - Digital-to-Analog Converter
- display_backlight - Display Backlight Function Block
- gpio_in - GPIO In
- gpio_out - Gpio Output
- numeric_display_char - Digit Display
- pwm - Pulse Width Modulation
- gui_image_file - GUI Image File
- gui_leds - gui_leds
- gui_patch - Gui Patch
- gui_text_bool - gui_text_bool
- gui_text_bool1 - gui_text_bool1
- gui_text_bool2 - Gui Text Bool
- gui_text_int - gui_text_int
- gui_text_int1 - gui_text_int1
- gui_text_int2 - Gui Text Int
- gui_text_real - gui_text_real
- gui_text_real1 - gui_text_real1
- gui_text_real2 - Gui Text Real
- gui_text_string - gui_text_string
- gui_text_string1 - gui_text_string1
- gui_text_string2 - Gui Text String
- gui_viewport - Gui Viewport
- guiimage - guiimage
- guiimage1 - guiimage1
- guitextbox_b - guitextbox_b
- guitextbox_i - guitextbox_i
- guitextbox_r - guitextbox_r
- guitextbox_s - guitextbox_s
- ui_chart - Gui Chart
- ui_list - Gui List
- ui_spinner - Gui Spinner
- keypress - Reads key presses & control keys
- inx-unity - Provides media and animation widget interface
- unity2 - Unity 3D
- webkit - JavaScript/WebKit Interface (Obsolete)
- AvailableLanguages - AvailableLanguages
- SelectLang - SelectLang
- audio_input_level - Calibrate Function Block
- devman_player - devman_player
- playlist_manager - Play Manager
- dtv_diag_s - Dtvdiagnosticstring
- dtv_pvr_list - dtv_pvr_list
- dtv_pvr_play - dtv_pvr_play
- dtv_pvr_play2 - Dtvpvrplay2
- dtv_remote - dtv_remote
- dtv_remote1 - dtv_remote1
- dtv_remote2 - Dtvremotekey2
- inx-netsocket - Provides a raw TCPIP Socket Client
- netsocketrsrvr - Provides a raw TCPIP Socket Server
- url_get - Implements HTTP requests with file or in-memory result processing.
- mqtt_client - MQTT Client
- mqtt_publish - MQTT Publish
- mqtt_subscribe - MQTT Subscribe
- network_config - TCPIP Network Config
- devman_interface - Devman Device Management control and data source.
- wifi_station - Wifi station configurator
- lorawan - LoRaWAN configuration and data processing
- uart - Bi directional UART data IO.
- uart_config - UART Config (e.g. USB, TTL, RS232, RS485)
- modbus_config - Modbus Configuration
- modbus_slave_register - Modbus Slave mode register read/write.
- modbus_read - MODBUS Master Mode data register read
- modbus_write - MODBUS Master Mode register Write
- ADC Polled Analogue to Digital converter.
- ADC_continuous Advanced ADC supporting clocked ISR modes and advanced signal averaging.
- FFT8 Fast Fourier Transform of 8 bit binary input data
- FIR8 Finite Impulse Response filter for 8 bit binary data.
- IIR8 Infinite Impulse Response filter for 8 bit binary data.
- [calibrate](ADC calibrate) - Calibrates the ADCs
- pid_controller - PID Controller with hardware accelertion options
- pid_relay_config - PID GPIO/PWM Configuration Function Block
- mv_camera - Provides access to camera input data image streams
- mv_idsplay - Renders camera image streams.
- mv_resize - Resizes an image using given interpolation method
- mv_crop - Crops and image width and height at a give offset
- mv_apriltag_reader Plain Old Prgramming AprilTag Reader
- ml_tflite_inference Machine learning model inference.
- ml_osvm Online iterative machine learning (training& inference).
- reboot - Reboot the device
- rtc - RealTimeClock - provdes date/time from RTC device or OS.
- rtinfo - RuntimeInfo (e.g. MAC/IP address, memory,... )
- scheduler - Weekly Scheduler
- system_exec - Executes linux shell commands
- rng - Random Number Generator (may use hardware RNG)
- time_clock - time internal clock generator
- wall_clock - wall clock (date/time) provider.
- appget - Application Server
- appinfo - App Info
- application_info_getter - application_info_getter
- application_run - ApplicationRun
- ehs_controller - Runtime Control
- ota - OTA Function Block for updating firmware
- ota_data_parser - Assembles OTA data files from Devman.
Some function blocks that can be used Lucid app are for visual/organisation purposes only and do not translate into any executable ert-components.
- xinputb - XinputBoolean
- xinputi - XinputInteger
- xinputr - XinputReal
- xinputs - XinputString
- xoutputb - XoutputBoolean
- xoutputi - XoutputInteger
- xoutputr - XoutputReal
- xoutputs - XoutputString
-Note this file is autogenerated from ert-config help files and may not currently be complete or properly categorised!