Introduction

In version 4.0.0 we completely replace unsigned integers (only positive numbers) with signed integers in Graphical Programming. This has the advantage that you now can work directly with negative numbers in Graphical Programming.

This will be the standard for all projects going forward. New projects created with BSW Version 4.0.0 and newer will use signed integers. Old Projects will be changed to use signed integers when updating to BSW Version 4.0.0 or newer.

Working Examples

With the support of negative numbers it is now possible to e.g.

  • calculate negative values of a temperature sensor
  • calculate negative values of a mathematical calculation

Compatibility

You can continue to work on old Projects (BSW Version 3.10.0 or older) without updating. In this case Graphical Programming will continue to work exactly as it did before Version 4.0.0.


Technical Implications

The effective range of numbers you can work with in Graphical Programming is shifted form previously 0 - 4294967295 to now -2147483648 - 2147483647. If you used to work with numbers bigger than 2147483647 in your project additional attention is needed, as this could potentially create integer overflows and thus unexpected behavior.


Update Process

When updating your project to BSW 4.0.0 or newer from a previous version, your Graphical Programming diagram is updated automatically as well. All blocks provided with Graphical Programming will be replaced with their respective new versions that are able to handle signed integers. For all the blocks that are created by customers we run a special update procedure were we clone the original blocks, change the included code to handle signed integers and add a _signed suffix to the name of the block. Custom blocks used on the diagram will then be replaced with their signed version. Backups are created during this update and make it possible to switch back to the previous version of your project should problems arise.

Custom block update

Changing CAN Data Types

For the visualization of the Datapoints on the CAN bus, the data type can also be changed from default unsigned integer to signed integer or other data types. This can be done in the. CAN DB Editor (F2).

CAN data type selection