10 - 12 - 2024

Convertors library

This library contains blocks for converting signals from one type to other.

 

Block SchmittTriger

License: Hobby, Industrial

The block is suitable for converting analog signal to digital. Usually analog signals have noise and can float, the Schmitt effect is very important to be used in this kind of conversion.

Parameters:

  • HiHysteresis with default value of 2.4;
  • LowHysteresis with default value 2.0;

When the input signal gets value over HiHysteresis the output becomes High value. If the input signal gets value below LowHysteresis the output becomes low value. The difference between HiHysteresis and LowHysteresis is Hysteresis.

 

Block AnalogToBool

License: Hobby, Industrial 

The block has a parameter: Range. It can be one of the next values: 0..5V, 0..3.3V, 0..1023 and determines the range of the block's input signal. Depending of the selected parameter Range, the block has a simple internal SchmittTriger, which converts the analog input to a digital output. 

 

Block BoolToAnalog

License: Hobby, Industrial

The block converts digital input to analog output.

Parameters:

  • HightValue - the output gets this value when the input is at High level;
  • LowValue - the output gets this value when the input is at Low level;

 

Block AnalogToStr

License: Hobby, Industrial

The block converts analog input to string output.

Parameters:

  •  NumAfterPoint – number of decimals for conversion; 
     

 

Block StrToAnalog

License: Hobby, Industrial

The block converts string input to analog output. The block has no parameters.


 

Block IntToBool

License: Hobby, Industrial

This block is very important and converts integer input to digital outputs. For example RadioGroup control has an integer output which corresponds with selected control's item. If we want to every item to shitch a lamp, we have to convert integer value to as many digital signals as control's items we have. The block has a parameter Outputs, which allows to set the first digital output to which integer valie corresponds and how many digital outputs block has.

 

A few examples for Outputs parameter:

  • Min=1, Num Out = 10, the block has 10 digital outputs which correspond to integer input in range 1..10;
  • Min=100, Num Out = 20, the block has 20 digital outputs which correspond to integer input in range 100..120;

Block BoolToInt

License: Hobby, Industrial

 

The block sets the output Int with value of the position of the digital input, which is at high level. The block has a parameter Outputs, which sets the number of digital inputs of the block and index of the first digital input. If some of the digital inputs is changed, the output OnChanged becomes to high level.

 

Block AnalogToInt

License: Hobby, Industrial

The block converts the whole value of analog input to integer output. 

 

Block IntToAnalog

License: Hobby, Industrial

 The block converts an integer input to analog output.