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.

LM as BACNET CLient slow connection
#1
Hi!

We're having trouble with the Bacnet Client APP. We have 5 Fancoil controllers communicating via Bacnet. The mapping of the variables was rather slow but we get all of them to work.

But now the variables take too long to update the values (our customer says 20 minutes) and its impossible to control the fancoils this way. Is there some configuration that we're missing? Is it possible to confirm the COV funcionality?

Any ideia towards some solution will be appreciated.

The LM's firmware is Version: 20200116.


BR,
André Neves
Reply
#2
The bacnet client was designed for very small integrations. No there is no COV only pooling. I assume you do it via the app. First recommendation would be to limit the amount of objects to absolute minimum. If this won't help then probably control via script would be better here.
------------------------------
Ctrl+F5
Reply
#3
Daniel, thanks for the quick reply.

We have 105 objects in total (21 for each fancoil). is it too much for the app?

What is the pooling rate? is it possible to change the rate?

Can you point me to an example how to do this via script? It would be great if I could keep the mapping already done.

Thnak you.
Reply
#4
I would say you should not go over 50, No we can't modify the pooling of the app.
https://openrb.com/logicmachine-as-bacnet-client/
------------------------------
Ctrl+F5
Reply
#5
(16.07.2021, 14:15)Daniel. Wrote: I would say you should not go over 50, No we can't modify the pooling of the app.
https://openrb.com/logicmachine-as-bacnet-client/
OK...

Can you tell me the pooling rate?

If I change to the bacnet "via tab" will be able to have a good performance for the 100+ points?

Can I schedule the poolings so it doesn't strain too much the bus?

Thanks.
Reply
#6
Reading object by object won't help much I think. There is option to read whole device at once and then you will need to extract each objects from the list.  Make sure that all is a single resident script.

Read whole device like this:
Code:
require('bacnet')
device, objects = bacnet.scandevice(ID)
To read single present value form this objects list do this:
Code:
function findobject(objects, objtype, objid)
   for _, object in ipairs(objects) do
     if object.identifier == objid and object.type == objtype then
       return object
     end
   end
end

object = findobject(objects, 'analog value', Object-ID)
log(tonumber(object["present-value"]))
Test this and see if it works better.
------------------------------
Ctrl+F5
Reply
#7
Function: There was an error in the data type conversion processing for bacnet objects' binary value ',' binary output ', and' binary input 'by tonumber (object ["present value"]).
Take the object 'binary value' as an example: its object ["present value"] is "active" or "inactive", but the value obtained by tonumber (object ["present value"]) is "nil"

1.My script is as follows:
require('bacnet')
device, objects = bacnet.scandevice(3536)
--log(device, objects)
function findobject(objects, objtype, objid)
for _, object in ipairs(objects) do
if object.identifier == objid and object.type == objtype then
return object
end
end
end

object = findobject(objects, 'binary value', 4104)

read_value1, read_value2 = object["present-value"], tonumber(object["present-value"])

log(object,read_value1, read_value2)

2.log:
Event for Bacnet read test (33/0/8) 28.03.2023 12:54:28
* arg: 1
* table:
["present-value"]
* string: inactive
["id"]
* number: 12
["description"]
* string: .................. #395 (2/0/8)
["priority-array"]
* string: Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,0
["overridden"]
* bool: false
["identifier"]
* number: 4104
["in-alarm"]
* bool: false
["type"]
* string: binary value
["name"]
* string: .................. #395 (2.0.8)
["fault"]
* bool: false
["out-of-service"]
* bool: false
* arg: 2
* string: inactive
* arg: 3
* nil
-------------------------------------------
attach:I am not sure if it is related to my installation of the following package.
https://dl.openrb.com/lm-23-imx6/pkg/gen...0_imx6.ipk
https://dl.openrb.com/lm-23-imx6/pkg/gen...0_imx6.sig
Reply
#8
Use this conversion function instead of tonumber:
Code:
function tovalue(val)
  if type(val) ~= 'string' then
    return nil
  elseif val == 'active' then
    return true
  elseif val == 'inactive' then
    return false
  else
    return tonumber(val) or val
  end
end
Reply


Forum Jump: