Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
cms:units:sensors:param [24/09/2018 12:12]
tagr
cms:units:sensors:param [21/11/2018 13:59] (current)
tagr zark
Line 35: Line 35:
 For example, //adc8// is a parameter that registers the values coming from the eighth analog input. ​ For example, //adc8// is a parameter that registers the values coming from the eighth analog input. ​
  
-Usually, the data from digital inputs and outputs are presented in messages in the following format: I/O = 0/0, where I refers to inputs, O — outputs. If I/O = 0/0, it means all bits (inputs and outputs) are inactive. If a value in any of them is not zero, it means that one input/​output or several of them are active. To define ​which exactly, hexadecimal number ​(which you see in a message) should be converted into a bit number. ​+Usually, the data from digital inputs and outputs are presented in messages in the following format: I/O = 0/0, where I refers to inputs, O — outputs. If I/O = 0/0, it means all bits (inputs and outputs) are inactive. If a value in any of them is not zero, it means that one input/​output or several of them are active. To determine ​which exactly, ​convert the hexadecimal number ​to binary and use the latter to define ​a bit number.
  
 For instance, when the ignition was activated, we received the message with the parameter I/O = 10/0. To get the bit number (input) in which the value of the sensor is shown, it is necessary to enter the received value in the calculator in the mode of hexadecimal values (HEX). That is, enter 10 and switch to the binary mode (BIN). We get a new number - 10000. Now we have to calculate in which position 1 has appeared. The calculation is done from right to left. In the given case 1 is in position 5, i.e. the ignition sensor is connected to the fifth port. Since the changed number is before the fraction (I/O), it is the input. Consequently,​ the parameter name is in5 (digital input 5). For instance, when the ignition was activated, we received the message with the parameter I/O = 10/0. To get the bit number (input) in which the value of the sensor is shown, it is necessary to enter the received value in the calculator in the mode of hexadecimal values (HEX). That is, enter 10 and switch to the binary mode (BIN). We get a new number - 10000. Now we have to calculate in which position 1 has appeared. The calculation is done from right to left. In the given case 1 is in position 5, i.e. the ignition sensor is connected to the fifth port. Since the changed number is before the fraction (I/O), it is the input. Consequently,​ the parameter name is in5 (digital input 5).
Follow us on Facebook Gurtam Wialon Twitter Gurtam Wialon info@gurtam.com   |   Copyright © 2002-2019 Gurtam