PoBlocks User manual Version: March 31, 2014
PoBlocks user manual (March 31, 2014) Please read the following notes 1. All information included in this document is current as of the date this document is issued. Such information, however, is subject to change without any prior notice. 2. PoLabs does not assume any liability for infringement of patents, copyrights, or other intellectual property rights of third parties by or arising from the use of PoLabs products or technical information described in this document.
PoBlocks user manual (March 31, 2014) 1. PoBlocks description PoBlocks is a graphical programming tool for PoKeys devices. It features an intuitive and clean interface and enables the user to quickly and easily design, deploy and debug a program that gets transferred and executed by the PoKeys device itself. PoBlocks was developed with ease of use in mind, which means that it does not require long manuals, extended tutorials or deep knowledge to use.
PoBlocks user manual (March 31, 2014) 3. Requirements ● ● ● Windows XP, Vista, 7, 8 (other platforms coming soon) Visual C++ 2010 Redistributable Package installed on the target computer PoKeys56 or newer device (on USB or network) 4. Installation PoBlocks application is a part of the PoKeys software installation package, available free of charge on www.poscope.com. 4 www.poscope.
PoBlocks user manual (March 31, 2014) 5. Contents 1. PoBlocks description ............................................................................................................................. 3 2. Main features ........................................................................................................................................ 3 3. Requirements ....................................................................................................................................
PoBlocks user manual (March 31, 2014) 13.2. Reading data from shared data slots ...................................................................................... 19 14. PoBlocks data types ........................................................................................................................ 20 15. Blocks description ........................................................................................................................... 21 15.1. IO - Digital input ............
PoBlocks user manual (March 31, 2014) 15.29. Memory - D latch .................................................................................................................... 29 15.30. Memory - JK flip-flop ............................................................................................................... 30 15.31. Memory - D flip-flop................................................................................................................ 30 15.32. Memory - T flip-flop ........
PoBlocks user manual (March 31, 2014) 15.60. Control - PID ............................................................................................................................ 43 15.61. Misc - Comment ...................................................................................................................... 44 15.62. Misc - To .................................................................................................................................. 44 15.63. Misc - From ....
PoBlocks user manual (March 31, 2014) 6. PoLabs PoIL core introduction PoKeys PoIL core is a virtual 16/32-bit software processor, which interprets PoIL code in PoKeys device and has access to various PoKeys peripherals. PoIL code is created in the compiling process in the PoBlocks application and is stored in the flash memory of the PoKeys device. 6.1.
PoBlocks user manual (March 31, 2014) 7. User interface PoBlocks user interface is displayed below. Top area contains menu bar, tolbar with device controls and block library. Bottom left area is diagram design area, while the right part is reserved for properties panel that contains dynamic properties of project or currently selected block. Device controls Menu bar Toolbar Block library Properties panel Design area 7.1.
PoBlocks user manual (March 31, 2014) - - Device selection: this opens a device selection dialog to select a device to download the PoIL code to. Monitor mode: clicking the Monitor mode button enables or disables the real-time monitor mode (this is available after the diagram has been successfully compiled and downloaded to the device). Reset PoIL core: use this command to reset the PoIL code execution. Stop PoIL core: this command stops the PoIL code execution.
PoBlocks user manual (March 31, 2014) 7.3. Block library Block library panel contains graphical representations of function blocks in the PoBlocks library. The library is divided into block categories and tabbed menu system is used to switch between these. Each block in the block library offers integrated help system (see the figure below) that gets activated by hovering the mouse cursor over the block.
PoBlocks user manual (March 31, 2014) Reset core on startup: if checked, PoIL core executes the initialization code on PoKeys device startup (defining the pin functions, setting-up the peripherals used in the diagram, etc.
PoBlocks user manual (March 31, 2014) 8.2. Removing blocks Select one block or use lasso selection to select multiple blocks, then press 'Delete' button. 8.3. Moving blocks Use left mouse button to move the selected block. 8.4. Copying blocks Select the blocks you want to copy by a ‘lasso tool’. Press down the left mouse button on an empty part of the diagram, then drag the mouse to select the blocks. To copy the blocks, press Ctrl+C or go to Edit > Duplicate selected. 8.5.
PoBlocks user manual (March 31, 2014) In order to connect multiple inputs (left ports) to one output (right port), start by creating a base connection between one input and one output. Then, start adding another connection by clicking on an empty input and complete the connection by clicking on an existing connection. 8.6. Constant inputs Often a simple constant value is used as an input parameter.
PoBlocks user manual (March 31, 2014) 9. Compile process After PoBlocks diagram is finished, a built-in compiler is used to translate it into PoIL code that is then transferred and executed on a PoKeys device. During compiling, the diagram is checked for errors and if any are detected, a pop-up error list window will appear and compiler process will be stopped. User has to correct the errors before the diagram can be fully compiled and transferred to the PoKeys device.
PoBlocks user manual (March 31, 2014) 11. Exceptions The following figure displays a 'Division by zero' exception description after clicking the 'Exception' mode button in the device controls. The dialog also displays the most probable block that caused the exception. 12. Monitor mode PoBlocks features a ‘Monitor mode’ that is used to observe the PoBlocks diagram execution on the device in nearly real-time.
PoBlocks user manual (March 31, 2014) 13. Task manager PoBlocks features task manager feature that gives the user an insight into how the PoIL code is being executed. Task manager can be accessed when the connection with PoKeys device is established by clicking on Tools > Task manger. Task manager shows all tasks that are currently being executed and the basic information on tasks’ performances.
PoBlocks user manual (March 31, 2014) Double-click Move the cursor over to the port you want to share and click on it – this will complete the assignment process for that shared data slot. A shared port will be highlighted in yellow with the text showing ‘Sx’ (where x is the Shared data slot ID). Shared slot ID (displayed as a shared slot index in the list and on every port with shared slot assigned to) is used to refer to this slot from other systems.
PoBlocks user manual (March 31, 2014) Monitoring and changing of shared data slots In order to see the values of shared data slots and/or to change it, open the Shared data slot manager (to open it, go to ‘Tools > Shared slot manager’ menu). 15. PoBlocks data types In general, PoBlocks supports Boolean values (1-bit) and signed integer numbers (8-, 16- or 32-bit).
PoBlocks user manual (March 31, 2014) 16. Blocks description 16.1. IO - Digital input Description Inputs Outputs Properties Digital input is used to read the state of the digital input on PoKeys device None Value (Logic): Digital input state Pin ID (Integer, 1 to 55): PoKeys pin ID as indicated on the device Init function (Logic): If true, PoBlocks will setup the selected pin as digital input on startup Inverted (Logic): If true, pin state will be inverted Remarks None 16.2.
PoBlocks user manual (March 31, 2014) 16.4. IO - PWM output Description PWM output is used to set the duty cycle of the PWM (pulse width modulated) output Inputs Duty (32-bit integer): Duty cycle in the range from 0 to Duty range (block parameter) Enable (Logic): Enable input.
PoBlocks user manual (March 31, 2014) Channel B pin (Integer, 1 to 55): PoKeys pin ID as indicated on the device, used for encoder B channel signal Multiplier 4x (Logic): Activate the 4x multiplier for encoder signals - encoder counter is incremented on any change of the A or B signals Init encoder (Logic): If true, PoBlocks will initialize the encoder with the specified settings on startup Clear on start (Logic): If true, encoder counter will be reset on startup Show reset input (Logic): If true, reset inp
PoBlocks user manual (March 31, 2014) 16.9. IO - PoExtBus output Description PoExtBus output sets the state of one output on PoExtBus module Inputs Output (Logic): Output state Enable (Logic): Enable input.
PoBlocks user manual (March 31, 2014) C (32-bit integer): Third variable C D (32-bit integer): Forth variable D Outputs Sum (32-bit integer): Sum of A and B Properties Inputs (Integer, 2 to 4): Number of inputs Remarks None 16.13. Algebra - Subtract Description Difference of two inputs Inputs A (32-bit integer): First variable A B (32-bit integer): Second variable B Outputs A - B (32-bit integer): Difference of A and B (A - B) Properties None Remarks None 16.14.
PoBlocks user manual (March 31, 2014) Properties None Remarks None 16.17. Description Inputs Outputs Properties Remarks 16.18.
PoBlocks user manual (March 31, 2014) 16.21. Logic - AND Description AND : logical AND operation Inputs A (Logic): A signal input B (Logic): B signal input C (Logic): C signal input D (Logic): D signal input Outputs AND (Logic): Result of logical AND operation on input signals NAND (Logic): Negated result of logical AND operation Properties Show negated output (Logic): Set to True to display the NAND output Inputs (Integer, 2 to 4): Number of logical inputs Remarks None 16.22.
PoBlocks user manual (March 31, 2014) !Result (Logic): Negated result of the comparison Properties Show negated output (Logic): Set to True to display the negated result output Remarks None 16.25.
PoBlocks user manual (March 31, 2014) Remarks None 16.29. Logic - Compare (NE) Description Compare (NE) checks whether Value is not equal to Reference Inputs Value (32-bit integer): Input signal Reference (32-bit integer): Reference signal Outputs Result (Logic): Result of comparison - 1 if condition is met, 0 otherwise !Result (Logic): Negated result of the comparison Properties Show negated output (Logic): Set to True to display the negated result output Remarks None 16.30.
PoBlocks user manual (March 31, 2014) Outputs Q (Logic): Latch state Properties Default value (Logic): Default value on reset Retain on reset (Logic): If True, the value is saved to battery-backed RAM. Initial value (Logic): The initial value of the retained block after it gets uploaded to the device. Remarks None 16.33.
PoBlocks user manual (March 31, 2014) 16.36. Memory - Data latch Description Data latch simulates a data latch.
PoBlocks user manual (March 31, 2014) 16.39. Memory - MAX memory Description MAX memory remembers the maximum value of the Data in signal. Use CLK input to reset the memory. Inputs Data in (32-bit integer): Integer data input CLK (Logic): Clock input signal Outputs Value (32-bit integer): Stored maximum value Properties Default value (Integer): Default reset value Retain on reset (Logic): If True, the value is saved to battery-backed RAM. Also disabled default value setting.
PoBlocks user manual (March 31, 2014) Initial value (Integer, 0 to 65535): The initial value of the retained block after it gets uploaded to the device. Initial RAM value (Integer, 0 to 65535): The initial value of the retained block after it gets uploaded to the device. Remarks None 16.42.
PoBlocks user manual (March 31, 2014) 16.44. Trigger / timing - Clock source Description Inputs Outputs Properties Clock source Half time-period (32-bit integer): Dynamic Half time-period optional input Clock (Logic): Half time-period (Integer, 1 to 3600000): Half of the clock time period (in milliseconds - set to 500 for 1 Hz clock) Show dynamic input (Logic): If set to True, Half-time period input is enabled Remarks None 16.45.
PoBlocks user manual (March 31, 2014) Remarks None 16.48.
PoBlocks user manual (March 31, 2014) PT (32-bit integer): Timer period signal input (in ms) Outputs Q (Logic): Timer activation status signal ET (32-bit integer): Timer current time signal (in ms) Properties None Remarks 16.51. Trigger / timing - On timer Description On timer or (on delay timer) starts counting time on IN input signal rising edge and turns on after the period defined by PT.
PoBlocks user manual (March 31, 2014) 16.53. Trigger / timing - Time Description Time is used to read current date and time Inputs None Outputs Second (8-bit integer): Seconds Minute (8-bit integer): Minute Hour (8-bit integer): Hour Day of month (8-bit integer): Day of month Month (8-bit integer): Month Year (16-bit integer): Year Day of week (8-bit integer): Day of week Properties None Remarks None 16.54.
PoBlocks user manual (March 31, 2014) 16.55. Extended - Look-up table (byte) Description Look-up table (byte) is used to select data from the table. Double-click on block to edit configuration. Inputs Position (32-bit integer): Look-up table entry index Outputs Out (8-bit integer): Entry value Properties None Remarks Use look-up table editor to set values of the entries. Use check boxes on the left to set number of entries in the table. 16.56.
PoBlocks user manual (March 31, 2014) the Schedule block to access the editor. Each rule defines one time interval during which the output is activated. Use left mouse button to drag the ON and OFF sliders to appropriate positions and select weekdays that the rule is valid on. If OFF slider is positioned to the left of the ON slider, ON slider time refers to the time in the next day. By default, 2 rules are available for setup (to increase the number of rules, change the 'Rules' property of the block).
PoBlocks user manual (March 31, 2014) Inputs SEL (8-bit integer): SEL In 1-10 (32-bit integer): Input 1-10 Outputs Out (32-bit integer): Value of the selected input Properties Inputs (Integer, 2 to 10): Number of inputs Remarks None 16.58. Extended - Deadband Description Deadband adds symetrical deadband effect to the input signal.
PoBlocks user manual (March 31, 2014) Inputs Outputs Properties Remarks output values) content. LCD UI block must be stimulated on the refresh input in order to refresh the contents of the LCD. LCD refresh is a time-consuming operation and is not done by PoBlocks or PoIL code by itself – user has to define a proper refresh time using clock signal block or generate a signal to refresh the LCD otherwise. Double-click on block to edit configuration.
PoBlocks user manual (March 31, 2014) 16.62. Description Inputs Outputs Properties Remarks 16.63.
PoBlocks user manual (March 31, 2014) 16.65. Control - On/off Description On/off Inputs PV (32-bit integer): Process Variable input (current value of the controlled variable) SP (32-bit integer): Set Point Outputs Out (32-bit integer): On/Off controller output Properties Gain (Integer): Controller gain Hysteresis (Integer): Half of the controller hysteresis - the difference between turnon and turn-off points .
PoBlocks user manual (March 31, 2014) 16.68.
PoBlocks user manual (March 31, 2014) be specified for the same Link ID 16.72. Description Inputs Outputs Properties Remarks 16.73.
PoBlocks user manual (March 31, 2014) disables default value setting. Initial value (Integer): The initial value of the retained block after it gets uploaded to the device. Remarks None 16.76. Misc - Shared 32-bit Description Inputs Outputs Properties Shared 32-bit simulates a simple memory latch for use with shared slots. None (32-bit integer): Stored integer data Default value (Integer): Default reset value Retain on reset (Logic): If True, the value is saved to battery-backed RAM.
PoBlocks user manual (March 31, 2014) 17. Grant of license The material contained in this release is licensed, not sold. PoLabs grants a license to the person who installs this software, subject to the conditions listed below. Access The licensee agrees to allow access to this software only to persons who have been informed of and agree to abide by these conditions. Usage The software in this release is for use only with PoLabs products or with data collected using PoLabs products.