This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Comparator Error
#1
Hi, I'm trying to realize logical implication function by means of the "Greater than" block - see attached screen copy.
In Error Log screen I obtain th following message:
---------
Library custom/fbeditor20/Comparator:0: attempt to compare two boolean values
stack traceback:
Library custom/fbeditor20/Comparator: in function 'fbe_greater'
---------
How to resolve this situation& Thank you in advance! KR Oleg

Attached Files Thumbnail(s)
   
Reply
#2
Make sure that inputs to Greater then are not boolean.
------------------------------
Ctrl+F5
Reply
#3
(05.09.2022, 09:31)Daniel Wrote: Make sure that inputs to Greater then are not boolean.

Thank you, Daniel!
I just corrected control scheme - see attachment - added 1bit to 1 byte conversion. It works but in "Error log" I obtain the following message:
-------
Library custom/fbeditor20/Comparator:0: attempt to compare two nil values
stack traceback:
Library custom/fbeditor20/Comparator: in function 'fbe_greater'
-------
May be this conversion in not the right way for my control scheme?
Thank you in advance! KR Oleg

Attached Files Thumbnail(s)
   
Reply
#4
Send me your backup to PM
------------------------------
Ctrl+F5
Reply
#5
In the backup you sent me the second Grater than had no input selected but you have it on the photo above.

The problem you have here is as fallow. When linking output with a input you are using storage to transfer data. Originally you created the logic without the 8bit to 1byte and this logic is simply a script running in LM. When you use a storage the order is important as first you must create the storage and then you should read it. The way how block order works in FB is simply last block goes on the end of the script.  Here is the problem all 3 8bit to 1byte are on the end and in this block you crate the storage but Grater then are above and trying to read empty storage which never was created.  I eddied the script and moved the block higher.  No errors now.

Code:


require('custom.fbeditor20.Converter')

require('custom.fbeditor20.Comparator')

require('custom.fbeditor20.Select_switch')

require('custom.fbeditor20.Gate')



functions_Comparator_json_fbe_not_equal_input_1 = grp.getvalue('0/0/10')

functions_Comparator_json_fbe_not_equal_input_2 = 1

out, out_not = fbe_not_equal(functions_Comparator_json_fbe_not_equal_input_1, functions_Comparator_json_fbe_not_equal_input_2, 'fb__Ventilation__fbe_not_equal__id')

storage.set('fb__Ventilation__fbe_not_equal__out', out)



functions_Gate_json_fbe_OR_input_1 = storage.get('fb__Ventilation__fbe_greater__out')

functions_Gate_json_fbe_OR_input_2 = grp.getvalue('4/1/2')

functions_Gate_json_fbe_OR_input_3 = nil

functions_Gate_json_fbe_OR_input_4 = nil

functions_Gate_json_fbe_OR_input_5 = nil

functions_Gate_json_fbe_OR_input_6 = nil

functions_Gate_json_fbe_OR_input_7 = nil

functions_Gate_json_fbe_OR_input_8 = nil

out, out_not = fbe_OR(functions_Gate_json_fbe_OR_input_1, functions_Gate_json_fbe_OR_input_2, functions_Gate_json_fbe_OR_input_3, functions_Gate_json_fbe_OR_input_4, functions_Gate_json_fbe_OR_input_5, functions_Gate_json_fbe_OR_input_6, functions_Gate_json_fbe_OR_input_7, functions_Gate_json_fbe_OR_input_8, 'fb__Ventilation__fbe_OR__id')

if out ~= nil then

   grp.write('3/5/50', out)

end





functions_Converter_json_fbe_8bit_to_byte_input_1 = grp.getvalue('1/1/6')

functions_Converter_json_fbe_8bit_to_byte_input_2 = 0

functions_Converter_json_fbe_8bit_to_byte_input_3 = 0

functions_Converter_json_fbe_8bit_to_byte_input_4 = 0

functions_Converter_json_fbe_8bit_to_byte_input_5 = 0

functions_Converter_json_fbe_8bit_to_byte_input_6 = 0

functions_Converter_json_fbe_8bit_to_byte_input_7 = 0

functions_Converter_json_fbe_8bit_to_byte_input_8 = 0

out = fbe_8bit_to_byte(functions_Converter_json_fbe_8bit_to_byte_input_1, functions_Converter_json_fbe_8bit_to_byte_input_2, functions_Converter_json_fbe_8bit_to_byte_input_3, functions_Converter_json_fbe_8bit_to_byte_input_4, functions_Converter_json_fbe_8bit_to_byte_input_5, functions_Converter_json_fbe_8bit_to_byte_input_6, functions_Converter_json_fbe_8bit_to_byte_input_7, functions_Converter_json_fbe_8bit_to_byte_input_8, 'fb__Ventilation__fbe_8bit_to_byte__id')

storage.set('fb__Ventilation__fbe_8bit_to_byte__out__2', out)



functions_Converter_json_fbe_8bit_to_byte_input_1 = grp.getvalue('1/1/7')

functions_Converter_json_fbe_8bit_to_byte_input_2 = nil

functions_Converter_json_fbe_8bit_to_byte_input_3 = nil

functions_Converter_json_fbe_8bit_to_byte_input_4 = nil

functions_Converter_json_fbe_8bit_to_byte_input_5 = nil

functions_Converter_json_fbe_8bit_to_byte_input_6 = nil

functions_Converter_json_fbe_8bit_to_byte_input_7 = nil

functions_Converter_json_fbe_8bit_to_byte_input_8 = nil

out = fbe_8bit_to_byte(functions_Converter_json_fbe_8bit_to_byte_input_1, functions_Converter_json_fbe_8bit_to_byte_input_2, functions_Converter_json_fbe_8bit_to_byte_input_3, functions_Converter_json_fbe_8bit_to_byte_input_4, functions_Converter_json_fbe_8bit_to_byte_input_5, functions_Converter_json_fbe_8bit_to_byte_input_6, functions_Converter_json_fbe_8bit_to_byte_input_7, functions_Converter_json_fbe_8bit_to_byte_input_8, 'fb__Ventilation__fbe_8bit_to_byte__id__1')

storage.set('fb__Ventilation__fbe_8bit_to_byte__out', out)



functions_Converter_json_fbe_8bit_to_byte_input_1 = storage.get('fb__Ventilation__fbe_not_equal__out')

functions_Converter_json_fbe_8bit_to_byte_input_2 = 0

functions_Converter_json_fbe_8bit_to_byte_input_3 = 0

functions_Converter_json_fbe_8bit_to_byte_input_4 = 0

functions_Converter_json_fbe_8bit_to_byte_input_5 = 0

functions_Converter_json_fbe_8bit_to_byte_input_6 = 0

functions_Converter_json_fbe_8bit_to_byte_input_7 = 0

functions_Converter_json_fbe_8bit_to_byte_input_8 = 0

out = fbe_8bit_to_byte(functions_Converter_json_fbe_8bit_to_byte_input_1, functions_Converter_json_fbe_8bit_to_byte_input_2, functions_Converter_json_fbe_8bit_to_byte_input_3, functions_Converter_json_fbe_8bit_to_byte_input_4, functions_Converter_json_fbe_8bit_to_byte_input_5, functions_Converter_json_fbe_8bit_to_byte_input_6, functions_Converter_json_fbe_8bit_to_byte_input_7, functions_Converter_json_fbe_8bit_to_byte_input_8, 'fb__Ventilation__fbe_8bit_to_byte__id__2')

storage.set('fb__Ventilation__fbe_8bit_to_byte__out__1', out)







Selector = storage.get('fb__Ventilation__fbe_greater__out__1')

Input_1 = 0

Input_2 = 4

out = fbe_input_selection_switch(Selector, Input_1, Input_2, 'fb__Ventilation__fbe_input_selection_switch__id')

if out ~= nil then

   grp.write('3/6/7', out)

end



functions_Gate_json_fbe_OR_input_1 = grp.getvalue('3/5/61')

functions_Gate_json_fbe_OR_input_2 = grp.getvalue('3/5/62')

functions_Gate_json_fbe_OR_input_3 = grp.getvalue('3/5/63')

functions_Gate_json_fbe_OR_input_4 = grp.getvalue('3/5/64')

functions_Gate_json_fbe_OR_input_5 = grp.getvalue('3/5/65')

functions_Gate_json_fbe_OR_input_6 = grp.getvalue('3/5/66')

functions_Gate_json_fbe_OR_input_7 = nil

functions_Gate_json_fbe_OR_input_8 = nil

out, out_not = fbe_OR(functions_Gate_json_fbe_OR_input_1, functions_Gate_json_fbe_OR_input_2, functions_Gate_json_fbe_OR_input_3, functions_Gate_json_fbe_OR_input_4, functions_Gate_json_fbe_OR_input_5, functions_Gate_json_fbe_OR_input_6, functions_Gate_json_fbe_OR_input_7, functions_Gate_json_fbe_OR_input_8, 'fb__Ventilation__fbe_OR__id__1')

storage.set('fb__Ventilation__fbe_OR__out', out)



functions_Select_switch_json_fbe_input_selection_switch_input_1 = storage.get('fb__Ventilation__fbe_OR__out')

functions_Select_switch_json_fbe_input_selection_switch_input_2 = 3

functions_Select_switch_json_fbe_input_selection_switch_input_3 = 1

out = fbe_input_selection_switch(functions_Select_switch_json_fbe_input_selection_switch_input_1, functions_Select_switch_json_fbe_input_selection_switch_input_2, functions_Select_switch_json_fbe_input_selection_switch_input_3, 'fb__Ventilation__fbe_input_selection_switch__id__1')

if out ~= nil then

   grp.write('3/5/70', out)

end



functions_Comparator_json_fbe_greater_input_1 = storage.get('fb__Ventilation__fbe_8bit_to_byte__out')

functions_Comparator_json_fbe_greater_input_2 = storage.get('fb__Ventilation__fbe_8bit_to_byte__out__1')

out, out_not = fbe_greater(functions_Comparator_json_fbe_greater_input_1, functions_Comparator_json_fbe_greater_input_2, 'fb__Ventilation__fbe_greater__id')

storage.set('fb__Ventilation__fbe_greater__out', out)



functions_Comparator_json_fbe_greater_input_1 = nil

functions_Comparator_json_fbe_greater_input_2 = storage.get('fb__Ventilation__fbe_8bit_to_byte__out__2')

out, out_not = fbe_greater(functions_Comparator_json_fbe_greater_input_1, functions_Comparator_json_fbe_greater_input_2, 'fb__Ventilation__fbe_greater__id__1')

storage.set('fb__Ventilation__fbe_greater__out__1', out)
------------------------------
Ctrl+F5
Reply
#6
(06.09.2022, 08:44)Daniel Wrote: In the backup you sent me the second Grater than had no input selected but you have it on the photo above.

The problem you have here is as fallow. When linking output with a input you are using storage to transfer data. Originally you created the logic without the 8bit to 1byte and this logic is simply a script running in LM. When you use a storage the order is important as first you must create the storage and then you should read it. The way how block order works in FB is simply last block goes on the end of the script.  Here is the problem all 3 8bit to 1byte are on the end and in this block you crate the storage but Grater then are above and trying to read empty storage which never was created.  I eddied the script and moved the block higher.  No errors now.

Code:


require('custom.fbeditor20.Converter')

require('custom.fbeditor20.Comparator')

require('custom.fbeditor20.Select_switch')

require('custom.fbeditor20.Gate')



functions_Comparator_json_fbe_not_equal_input_1 = grp.getvalue('0/0/10')

functions_Comparator_json_fbe_not_equal_input_2 = 1

out, out_not = fbe_not_equal(functions_Comparator_json_fbe_not_equal_input_1, functions_Comparator_json_fbe_not_equal_input_2, 'fb__Ventilation__fbe_not_equal__id')

storage.set('fb__Ventilation__fbe_not_equal__out', out)



functions_Gate_json_fbe_OR_input_1 = storage.get('fb__Ventilation__fbe_greater__out')

functions_Gate_json_fbe_OR_input_2 = grp.getvalue('4/1/2')

functions_Gate_json_fbe_OR_input_3 = nil

functions_Gate_json_fbe_OR_input_4 = nil

functions_Gate_json_fbe_OR_input_5 = nil

functions_Gate_json_fbe_OR_input_6 = nil

functions_Gate_json_fbe_OR_input_7 = nil

functions_Gate_json_fbe_OR_input_8 = nil

out, out_not = fbe_OR(functions_Gate_json_fbe_OR_input_1, functions_Gate_json_fbe_OR_input_2, functions_Gate_json_fbe_OR_input_3, functions_Gate_json_fbe_OR_input_4, functions_Gate_json_fbe_OR_input_5, functions_Gate_json_fbe_OR_input_6, functions_Gate_json_fbe_OR_input_7, functions_Gate_json_fbe_OR_input_8, 'fb__Ventilation__fbe_OR__id')

if out ~= nil then

   grp.write('3/5/50', out)

end





functions_Converter_json_fbe_8bit_to_byte_input_1 = grp.getvalue('1/1/6')

functions_Converter_json_fbe_8bit_to_byte_input_2 = 0

functions_Converter_json_fbe_8bit_to_byte_input_3 = 0

functions_Converter_json_fbe_8bit_to_byte_input_4 = 0

functions_Converter_json_fbe_8bit_to_byte_input_5 = 0

functions_Converter_json_fbe_8bit_to_byte_input_6 = 0

functions_Converter_json_fbe_8bit_to_byte_input_7 = 0

functions_Converter_json_fbe_8bit_to_byte_input_8 = 0

out = fbe_8bit_to_byte(functions_Converter_json_fbe_8bit_to_byte_input_1, functions_Converter_json_fbe_8bit_to_byte_input_2, functions_Converter_json_fbe_8bit_to_byte_input_3, functions_Converter_json_fbe_8bit_to_byte_input_4, functions_Converter_json_fbe_8bit_to_byte_input_5, functions_Converter_json_fbe_8bit_to_byte_input_6, functions_Converter_json_fbe_8bit_to_byte_input_7, functions_Converter_json_fbe_8bit_to_byte_input_8, 'fb__Ventilation__fbe_8bit_to_byte__id')

storage.set('fb__Ventilation__fbe_8bit_to_byte__out__2', out)



functions_Converter_json_fbe_8bit_to_byte_input_1 = grp.getvalue('1/1/7')

functions_Converter_json_fbe_8bit_to_byte_input_2 = nil

functions_Converter_json_fbe_8bit_to_byte_input_3 = nil

functions_Converter_json_fbe_8bit_to_byte_input_4 = nil

functions_Converter_json_fbe_8bit_to_byte_input_5 = nil

functions_Converter_json_fbe_8bit_to_byte_input_6 = nil

functions_Converter_json_fbe_8bit_to_byte_input_7 = nil

functions_Converter_json_fbe_8bit_to_byte_input_8 = nil

out = fbe_8bit_to_byte(functions_Converter_json_fbe_8bit_to_byte_input_1, functions_Converter_json_fbe_8bit_to_byte_input_2, functions_Converter_json_fbe_8bit_to_byte_input_3, functions_Converter_json_fbe_8bit_to_byte_input_4, functions_Converter_json_fbe_8bit_to_byte_input_5, functions_Converter_json_fbe_8bit_to_byte_input_6, functions_Converter_json_fbe_8bit_to_byte_input_7, functions_Converter_json_fbe_8bit_to_byte_input_8, 'fb__Ventilation__fbe_8bit_to_byte__id__1')

storage.set('fb__Ventilation__fbe_8bit_to_byte__out', out)



functions_Converter_json_fbe_8bit_to_byte_input_1 = storage.get('fb__Ventilation__fbe_not_equal__out')

functions_Converter_json_fbe_8bit_to_byte_input_2 = 0

functions_Converter_json_fbe_8bit_to_byte_input_3 = 0

functions_Converter_json_fbe_8bit_to_byte_input_4 = 0

functions_Converter_json_fbe_8bit_to_byte_input_5 = 0

functions_Converter_json_fbe_8bit_to_byte_input_6 = 0

functions_Converter_json_fbe_8bit_to_byte_input_7 = 0

functions_Converter_json_fbe_8bit_to_byte_input_8 = 0

out = fbe_8bit_to_byte(functions_Converter_json_fbe_8bit_to_byte_input_1, functions_Converter_json_fbe_8bit_to_byte_input_2, functions_Converter_json_fbe_8bit_to_byte_input_3, functions_Converter_json_fbe_8bit_to_byte_input_4, functions_Converter_json_fbe_8bit_to_byte_input_5, functions_Converter_json_fbe_8bit_to_byte_input_6, functions_Converter_json_fbe_8bit_to_byte_input_7, functions_Converter_json_fbe_8bit_to_byte_input_8, 'fb__Ventilation__fbe_8bit_to_byte__id__2')

storage.set('fb__Ventilation__fbe_8bit_to_byte__out__1', out)







Selector = storage.get('fb__Ventilation__fbe_greater__out__1')

Input_1 = 0

Input_2 = 4

out = fbe_input_selection_switch(Selector, Input_1, Input_2, 'fb__Ventilation__fbe_input_selection_switch__id')

if out ~= nil then

   grp.write('3/6/7', out)

end



functions_Gate_json_fbe_OR_input_1 = grp.getvalue('3/5/61')

functions_Gate_json_fbe_OR_input_2 = grp.getvalue('3/5/62')

functions_Gate_json_fbe_OR_input_3 = grp.getvalue('3/5/63')

functions_Gate_json_fbe_OR_input_4 = grp.getvalue('3/5/64')

functions_Gate_json_fbe_OR_input_5 = grp.getvalue('3/5/65')

functions_Gate_json_fbe_OR_input_6 = grp.getvalue('3/5/66')

functions_Gate_json_fbe_OR_input_7 = nil

functions_Gate_json_fbe_OR_input_8 = nil

out, out_not = fbe_OR(functions_Gate_json_fbe_OR_input_1, functions_Gate_json_fbe_OR_input_2, functions_Gate_json_fbe_OR_input_3, functions_Gate_json_fbe_OR_input_4, functions_Gate_json_fbe_OR_input_5, functions_Gate_json_fbe_OR_input_6, functions_Gate_json_fbe_OR_input_7, functions_Gate_json_fbe_OR_input_8, 'fb__Ventilation__fbe_OR__id__1')

storage.set('fb__Ventilation__fbe_OR__out', out)



functions_Select_switch_json_fbe_input_selection_switch_input_1 = storage.get('fb__Ventilation__fbe_OR__out')

functions_Select_switch_json_fbe_input_selection_switch_input_2 = 3

functions_Select_switch_json_fbe_input_selection_switch_input_3 = 1

out = fbe_input_selection_switch(functions_Select_switch_json_fbe_input_selection_switch_input_1, functions_Select_switch_json_fbe_input_selection_switch_input_2, functions_Select_switch_json_fbe_input_selection_switch_input_3, 'fb__Ventilation__fbe_input_selection_switch__id__1')

if out ~= nil then

   grp.write('3/5/70', out)

end



functions_Comparator_json_fbe_greater_input_1 = storage.get('fb__Ventilation__fbe_8bit_to_byte__out')

functions_Comparator_json_fbe_greater_input_2 = storage.get('fb__Ventilation__fbe_8bit_to_byte__out__1')

out, out_not = fbe_greater(functions_Comparator_json_fbe_greater_input_1, functions_Comparator_json_fbe_greater_input_2, 'fb__Ventilation__fbe_greater__id')

storage.set('fb__Ventilation__fbe_greater__out', out)



functions_Comparator_json_fbe_greater_input_1 = nil

functions_Comparator_json_fbe_greater_input_2 = storage.get('fb__Ventilation__fbe_8bit_to_byte__out__2')

out, out_not = fbe_greater(functions_Comparator_json_fbe_greater_input_1, functions_Comparator_json_fbe_greater_input_2, 'fb__Ventilation__fbe_greater__id__1')

storage.set('fb__Ventilation__fbe_greater__out__1', out)

Thank you? Daniel. I'll keep in mind this issue. I made corrections and Error Log is empty :-) But I found the strange effect. Input pata is stable but outputs to groups 3/5/50 and 3/6/7 change their right values to 0. Please find attached two slides 1- correct an 2- with "0". I can't find the cause.... The same effect I see in ETS also.

(06.09.2022, 16:45)olegrz Wrote:
(06.09.2022, 08:44)Daniel Wrote: In the backup you sent me the second Grater than had no input selected but you have it on the photo above.

The problem you have here is as fallow. When linking output with a input you are using storage to transfer data. Originally you created the logic without the 8bit to 1byte and this logic is simply a script running in LM. When you use a storage the order is important as first you must create the storage and then you should read it. The way how block order works in FB is simply last block goes on the end of the script.  Here is the problem all 3 8bit to 1byte are on the end and in this block you crate the storage but Grater then are above and trying to read empty storage which never was created.  I eddied the script and moved the block higher.  No errors now.

Code:


require('custom.fbeditor20.Converter')

require('custom.fbeditor20.Comparator')

require('custom.fbeditor20.Select_switch')

require('custom.fbeditor20.Gate')



functions_Comparator_json_fbe_not_equal_input_1 = grp.getvalue('0/0/10')

functions_Comparator_json_fbe_not_equal_input_2 = 1

out, out_not = fbe_not_equal(functions_Comparator_json_fbe_not_equal_input_1, functions_Comparator_json_fbe_not_equal_input_2, 'fb__Ventilation__fbe_not_equal__id')

storage.set('fb__Ventilation__fbe_not_equal__out', out)



functions_Gate_json_fbe_OR_input_1 = storage.get('fb__Ventilation__fbe_greater__out')

functions_Gate_json_fbe_OR_input_2 = grp.getvalue('4/1/2')

functions_Gate_json_fbe_OR_input_3 = nil

functions_Gate_json_fbe_OR_input_4 = nil

functions_Gate_json_fbe_OR_input_5 = nil

functions_Gate_json_fbe_OR_input_6 = nil

functions_Gate_json_fbe_OR_input_7 = nil

functions_Gate_json_fbe_OR_input_8 = nil

out, out_not = fbe_OR(functions_Gate_json_fbe_OR_input_1, functions_Gate_json_fbe_OR_input_2, functions_Gate_json_fbe_OR_input_3, functions_Gate_json_fbe_OR_input_4, functions_Gate_json_fbe_OR_input_5, functions_Gate_json_fbe_OR_input_6, functions_Gate_json_fbe_OR_input_7, functions_Gate_json_fbe_OR_input_8, 'fb__Ventilation__fbe_OR__id')

if out ~= nil then

   grp.write('3/5/50', out)

end





functions_Converter_json_fbe_8bit_to_byte_input_1 = grp.getvalue('1/1/6')

functions_Converter_json_fbe_8bit_to_byte_input_2 = 0

functions_Converter_json_fbe_8bit_to_byte_input_3 = 0

functions_Converter_json_fbe_8bit_to_byte_input_4 = 0

functions_Converter_json_fbe_8bit_to_byte_input_5 = 0

functions_Converter_json_fbe_8bit_to_byte_input_6 = 0

functions_Converter_json_fbe_8bit_to_byte_input_7 = 0

functions_Converter_json_fbe_8bit_to_byte_input_8 = 0

out = fbe_8bit_to_byte(functions_Converter_json_fbe_8bit_to_byte_input_1, functions_Converter_json_fbe_8bit_to_byte_input_2, functions_Converter_json_fbe_8bit_to_byte_input_3, functions_Converter_json_fbe_8bit_to_byte_input_4, functions_Converter_json_fbe_8bit_to_byte_input_5, functions_Converter_json_fbe_8bit_to_byte_input_6, functions_Converter_json_fbe_8bit_to_byte_input_7, functions_Converter_json_fbe_8bit_to_byte_input_8, 'fb__Ventilation__fbe_8bit_to_byte__id')

storage.set('fb__Ventilation__fbe_8bit_to_byte__out__2', out)



functions_Converter_json_fbe_8bit_to_byte_input_1 = grp.getvalue('1/1/7')

functions_Converter_json_fbe_8bit_to_byte_input_2 = nil

functions_Converter_json_fbe_8bit_to_byte_input_3 = nil

functions_Converter_json_fbe_8bit_to_byte_input_4 = nil

functions_Converter_json_fbe_8bit_to_byte_input_5 = nil

functions_Converter_json_fbe_8bit_to_byte_input_6 = nil

functions_Converter_json_fbe_8bit_to_byte_input_7 = nil

functions_Converter_json_fbe_8bit_to_byte_input_8 = nil

out = fbe_8bit_to_byte(functions_Converter_json_fbe_8bit_to_byte_input_1, functions_Converter_json_fbe_8bit_to_byte_input_2, functions_Converter_json_fbe_8bit_to_byte_input_3, functions_Converter_json_fbe_8bit_to_byte_input_4, functions_Converter_json_fbe_8bit_to_byte_input_5, functions_Converter_json_fbe_8bit_to_byte_input_6, functions_Converter_json_fbe_8bit_to_byte_input_7, functions_Converter_json_fbe_8bit_to_byte_input_8, 'fb__Ventilation__fbe_8bit_to_byte__id__1')

storage.set('fb__Ventilation__fbe_8bit_to_byte__out', out)



functions_Converter_json_fbe_8bit_to_byte_input_1 = storage.get('fb__Ventilation__fbe_not_equal__out')

functions_Converter_json_fbe_8bit_to_byte_input_2 = 0

functions_Converter_json_fbe_8bit_to_byte_input_3 = 0

functions_Converter_json_fbe_8bit_to_byte_input_4 = 0

functions_Converter_json_fbe_8bit_to_byte_input_5 = 0

functions_Converter_json_fbe_8bit_to_byte_input_6 = 0

functions_Converter_json_fbe_8bit_to_byte_input_7 = 0

functions_Converter_json_fbe_8bit_to_byte_input_8 = 0

out = fbe_8bit_to_byte(functions_Converter_json_fbe_8bit_to_byte_input_1, functions_Converter_json_fbe_8bit_to_byte_input_2, functions_Converter_json_fbe_8bit_to_byte_input_3, functions_Converter_json_fbe_8bit_to_byte_input_4, functions_Converter_json_fbe_8bit_to_byte_input_5, functions_Converter_json_fbe_8bit_to_byte_input_6, functions_Converter_json_fbe_8bit_to_byte_input_7, functions_Converter_json_fbe_8bit_to_byte_input_8, 'fb__Ventilation__fbe_8bit_to_byte__id__2')

storage.set('fb__Ventilation__fbe_8bit_to_byte__out__1', out)







Selector = storage.get('fb__Ventilation__fbe_greater__out__1')

Input_1 = 0

Input_2 = 4

out = fbe_input_selection_switch(Selector, Input_1, Input_2, 'fb__Ventilation__fbe_input_selection_switch__id')

if out ~= nil then

   grp.write('3/6/7', out)

end



functions_Gate_json_fbe_OR_input_1 = grp.getvalue('3/5/61')

functions_Gate_json_fbe_OR_input_2 = grp.getvalue('3/5/62')

functions_Gate_json_fbe_OR_input_3 = grp.getvalue('3/5/63')

functions_Gate_json_fbe_OR_input_4 = grp.getvalue('3/5/64')

functions_Gate_json_fbe_OR_input_5 = grp.getvalue('3/5/65')

functions_Gate_json_fbe_OR_input_6 = grp.getvalue('3/5/66')

functions_Gate_json_fbe_OR_input_7 = nil

functions_Gate_json_fbe_OR_input_8 = nil

out, out_not = fbe_OR(functions_Gate_json_fbe_OR_input_1, functions_Gate_json_fbe_OR_input_2, functions_Gate_json_fbe_OR_input_3, functions_Gate_json_fbe_OR_input_4, functions_Gate_json_fbe_OR_input_5, functions_Gate_json_fbe_OR_input_6, functions_Gate_json_fbe_OR_input_7, functions_Gate_json_fbe_OR_input_8, 'fb__Ventilation__fbe_OR__id__1')

storage.set('fb__Ventilation__fbe_OR__out', out)



functions_Select_switch_json_fbe_input_selection_switch_input_1 = storage.get('fb__Ventilation__fbe_OR__out')

functions_Select_switch_json_fbe_input_selection_switch_input_2 = 3

functions_Select_switch_json_fbe_input_selection_switch_input_3 = 1

out = fbe_input_selection_switch(functions_Select_switch_json_fbe_input_selection_switch_input_1, functions_Select_switch_json_fbe_input_selection_switch_input_2, functions_Select_switch_json_fbe_input_selection_switch_input_3, 'fb__Ventilation__fbe_input_selection_switch__id__1')

if out ~= nil then

   grp.write('3/5/70', out)

end



functions_Comparator_json_fbe_greater_input_1 = storage.get('fb__Ventilation__fbe_8bit_to_byte__out')

functions_Comparator_json_fbe_greater_input_2 = storage.get('fb__Ventilation__fbe_8bit_to_byte__out__1')

out, out_not = fbe_greater(functions_Comparator_json_fbe_greater_input_1, functions_Comparator_json_fbe_greater_input_2, 'fb__Ventilation__fbe_greater__id')

storage.set('fb__Ventilation__fbe_greater__out', out)



functions_Comparator_json_fbe_greater_input_1 = nil

functions_Comparator_json_fbe_greater_input_2 = storage.get('fb__Ventilation__fbe_8bit_to_byte__out__2')

out, out_not = fbe_greater(functions_Comparator_json_fbe_greater_input_1, functions_Comparator_json_fbe_greater_input_2, 'fb__Ventilation__fbe_greater__id__1')

storage.set('fb__Ventilation__fbe_greater__out__1', out)

Thank you? Daniel. I'll keep in mind this issue. I made corrections and Error Log is empty :-) But I found the strange effect. Input data is stable but outputs to groups 3/5/50 and 3/6/7 change their right values to 0. Please find attached two slides 1- correct an 2- with "0". I can't find the cause.... The same effect I see in ETS also.

Hi, Daniel! By some manipulation with blocks order I just obtain stable result. As I understood, I need check code that produced by FB Editor to avoid mention above issues. The last problem was caused by the order on inputs in Greater than operation. FB Editor generated code with other order that I need. After correction "by hand" this code began operated normally.
Thank you for support! Have a nice evening. KR Oleg

Attached Files Thumbnail(s)
       
Reply


Forum Jump: