BAC0 Python fastPoll issue

23 views Asked by At

I'm trying to read an analog value from a Bacnet device every 100ms but the fastest i'm ables is every 1sec. Would anyone know why?

import BAC0
import json
import time
from datetime import datetime

bacnet = BAC0.lite(ip="192.168.1.8/24", port=47809)  
BAC0.tasks.Poll.DeviceFastPoll(bacnet,delay = 0.1)
data = {}


def main():
    while True:

        try:
            print(str(datetime.now()))
            print(bacnet.read('192.168.1.5 analogValue 101001 presentValue'))


            time.sleep(0.1)

        except KeyboardInterrupt:
            print ("Bye")
            sys.exit()
        
        

#RUN main
if __name__ == '__main__':
    main()

Result:

2023-05-22 16:16:52,094 - INFO    | Starting BAC0 version 22.9.21 (Lite)
2023-05-22 16:16:52,095 - INFO    | Use BAC0.log_level to adjust verbosity of the app.
2023-05-22 16:16:52,095 - INFO    | Ex. BAC0.log_level('silence') or BAC0.log_level('error')
2023-05-22 16:16:52,095 - INFO    | Starting TaskManager
2023-05-22 16:16:52,100 - INFO    | Using ip : 192.168.1.8:47809
2023-05-22 16:16:52,427 - INFO    | Starting app...
2023-05-22 16:16:52,436 - INFO    | BAC0 started
2023-05-22 16:16:52,436 - INFO    | Registered as Simple BACnet/IP App
2023-05-22 16:16:52,445 - INFO    | Update Local COV Task started
2023-05-22 16:16:52,446 - WARNING | Device defined for fast polling with a delay of 0.1sec
2023-05-22 16:16:52.448491
4.0
2023-05-22 16:16:52.560126
4.0
2023-05-22 16:16:53.580006
4.0
2023-05-22 16:16:54.594776
4.0
2023-05-22 16:16:55.616380
4.0

Tried setting delay to 0 also tried the while loop every 10ms but no success

0

There are 0 answers