Hi ,
I am a new bee to BACnet. I have used the latest BACnet stack and ported into STMF429 library. It works fine,my slave board comunnicating well with my master and displays the object values newly created by me. When i have added this Bacnet task into my exsiting project, it frequetly disconnected and object values couldn't read from my master, when a master polled these objects again it will found and displays the value. Hope this the timing issue to call my bacnet task.
Please advice me, Is it possible to change the timings? or What is the maximun delay to call the BACnet task.?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The dlmstp_task() is expected to be called about every 1 to 5 milliseconds, not to exceed 5 milliseconds between calls. If your main loop includes delays that makes the time between dlmstp_task() calls exceed 5 milliseconds, then the dlmstp_task() will not function correctly.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Steve,
Thanks, sorry for the late reply. Yes, this issue is soved when i called dlmstp_task() in 1 msec interval. I have tried upto 5 msec, but it works only at 1 msec interval.
One more question, my analog value and binary value object shows as a read only object at Master device. How can i turn into Read and writeable object?
Is there any special interrupt will occur when a write command initiate by master. Please advice me how to handle the write operation from master device. Thanks in advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Verify that that each object's WriteProperty handler does something useful for each property that is writable:
/* returns true if successful */
boolAnalog_Value_Write_Property(BACNET_WRITE_PROPERTY_DATA*wp_data){...switch(wp_data->object_property){casePROP_PRESENT_VALUE:if(value.tag==BACNET_APPLICATION_TAG_REAL){/* Command priority 6 is reserved for use by Minimum On/Off algorithm and may not be used for other purposes in any object. */if(Analog_Value_Present_Value_Set(wp_data->object_instance,value.type.Real,wp_data->priority)){status=true;}elseif(wp_data->priority==6){/* Command priority 6 is reserved for use by Minimum On/Off algorithm and may not be used for other purposes in any object. */wp_data->error_class=ERROR_CLASS_PROPERTY;wp_data->error_code=ERROR_CODE_WRITE_ACCESS_DENIED;}else{wp_data->error_class=ERROR_CLASS_PROPERTY;wp_data->error_code=ERROR_CODE_VALUE_OUT_OF_RANGE;}}else{status=false;wp_data->error_class=ERROR_CLASS_PROPERTY;wp_data->error_code=ERROR_CODE_VALUE_OUT_OF_RANGE;}break;...default:wp_data->error_class=ERROR_CLASS_PROPERTY;wp_data->error_code=ERROR_CODE_UNKNOWN_PROPERTY;break;}returnstatus;}
Master Nodes of BACnet MS/TP are in the datalink layer and "Master" only defines which nodes are able to discover their neighbors. WriteProperty is in the Application and can occur with any of the datalink layers including BACnet/IP which doesn't have a concept of Master Node. BACnet devices can be both client and server, or simply client or simply server.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi ,
I am a new bee to BACnet. I have used the latest BACnet stack and ported into STMF429 library. It works fine,my slave board comunnicating well with my master and displays the object values newly created by me. When i have added this Bacnet task into my exsiting project, it frequetly disconnected and object values couldn't read from my master, when a master polled these objects again it will found and displays the value. Hope this the timing issue to call my bacnet task.
Please advice me, Is it possible to change the timings? or What is the maximun delay to call the BACnet task.?
The dlmstp_task() is expected to be called about every 1 to 5 milliseconds, not to exceed 5 milliseconds between calls. If your main loop includes delays that makes the time between dlmstp_task() calls exceed 5 milliseconds, then the dlmstp_task() will not function correctly.
Hi Steve,
Thanks, sorry for the late reply. Yes, this issue is soved when i called dlmstp_task() in 1 msec interval. I have tried upto 5 msec, but it works only at 1 msec interval.
One more question, my analog value and binary value object shows as a read only object at Master device. How can i turn into Read and writeable object?
Is there any special interrupt will occur when a write command initiate by master. Please advice me how to handle the write operation from master device. Thanks in advance.
Verify that there is a WriteProperty handler callback:
Verify that each object has their WriteProperty handler in the device object call table (see demo/object/device.c for more examples):
Verify that that each object's WriteProperty handler does something useful for each property that is writable:
Master Nodes of BACnet MS/TP are in the datalink layer and "Master" only defines which nodes are able to discover their neighbors. WriteProperty is in the Application and can occur with any of the datalink layers including BACnet/IP which doesn't have a concept of Master Node. BACnet devices can be both client and server, or simply client or simply server.