BACNet via MSTP Syntax

I have a program which is trying to read the state of a digital output on a slave controller to determine if it is on or off. The main controller is a t3-bb with a t3-tb connected MSTP. The BB is ID 10 and the TB is ID 11. Here is the program snippet.

10 IF 10.11.DO3 then enable OUT1

when the program runs is doesn’t enable the output when DO3 is enabled on the other controller

Not sure if DO3 is a valid bacnet object, I think it should be BO3.

I would set a local var = to the remote bacnet point

10 VAR1 = 1111BO3
< where 1111 is the bacnet instance of the remote device.
and BO3 is the remote bacnet object on the remote device.
var1 is a local variable, make sure to set the range to ON-OFF

Then you can check here to make sure the remote point is coming in correctly, you can check the status here:

image

And finally, add a line to set the local OUT1 to the remote point
20 OUT1 = VAR1

You can see the syntax for other network devices on main and subnets, using bacnet and modbus protocols here:

Okay,

I had initially tried using DO3 and BO3 but was using the ID nomenclature - i.e. 10.11.BO3 that I had found in the thread - https://forums.temcocontrols.com/t/programming-for-bacnet-and-modbus-subnet-devices/156.

I changed it to the BACNet instance method and it works - i.e. 199315BO3. Is it safe to assume that the other method has been deprecated?

I noticed that intermittently the variable falsely changes from true to false for about 10 seconds or so. I assume that it timed out waiting for the BACNet read of BO3. Is there a way to not change the variable if the read times out ? Also is the below valid -

10 IF 199315BO3 THEN ENABLE OUT1

It would be nice to be able to access infomation using the labels.

I had initially tried using DO3 and BO3 but was using the ID nomenclature - i.e. 10.11.BO3 that I had found in the thread - https://forums.temcocontrols.com/t/programming-for-bacnet-and-modbus-subnet-devices/156.

I changed it to the BACNet instance method and it works - i.e. 199315BO3. Is it safe to assume that the other method has been deprecated?

Sounds to me like DO3 is a typo. BO3 is the correct bacnet object reference.

I noticed that intermittently the variable falsely changes from true to false for about 10 seconds or so. I assume that it timed out waiting for the BACNet read of BO3. Is there a way to not change the variable if the read times out ?

It sounds like a screen refresh issue, run a trend log on the item and see if it jumps around as you describe.

Also is the below valid -

10 IF 199315BO3 THEN ENABLE OUT1

It should work. You can check the network points and see the item updating, hopefully. If not try with the local variable.

[quote=“maurice, post:4, topic:1754, full:true”]
I had initially tried using DO3 and BO3 but was using the ID nomenclature - i.e. 10.11.BO3 that I had found in the thread - https://forums.temcocontrols.com/t/programming-for-bacnet-and-modbus-subnet-devices/156.

I changed it to the BACNet instance method and it works - i.e. 199315BO3. Is it safe to assume that the other method has been deprecated?

Sounds to me like DO3 is a typo. BO3 is the correct bacnet object reference.

> I meant 10.11.BO3 doesn’t work but 199315BO3 does work

I noticed that intermittently the variable falsely changes from true to false for about 10 seconds or so. I assume that it timed out waiting for the BACNet read of BO3. Is there a way to not change the variable if the read times out ?

It sounds like a screen refresh issue, run a trend log on the item and see if it jumps around as you describe.

With the example of -
10 TMP = 199315B03
20 IF TMP THEN ENABLE OUT1 ELSE DISABLE OUT1

I see OUT1 turn off intermittently

Bacnet Syntax:
Correct, use Bacnet Instace and Bacnet object. 199315B03
Not the xxx.yyy notation.

Intermittent Output
Make sure TMP is a global variable, not a local variable.
If its a local variable it will be grey in your program.
Make sure TMP has a range of ON-OFF or similar.
Put a trend log on TMP and also on OUT1.
If there are differences you could fire up a network capture tool to check through the data.

1 Like


I have several points that are binary values and I can not seem to get them to work uses the same syntax as the BO shown in the discusion. I am using deviceidBVx. You can see in the screen shot on the left I have several units off and several units on but in the variable list on the right they all show ON. Not sure why it will not read the bacnet points.

Partially resolved. Typo on BACnet instance 84 verses 48.
Writing on/off to TB over mstp still see no results at the TB using a BV9 where var9 is set to an on/off unit. Third party on/off point is received at router and shows in router var list but unable to then take this single point from third party and distribute onto the mstp network using multiple instanceidBV9 commands with a 5 second wait between each one.

The reading and writing of network points is done as a backkground task automatically by the T3 controller’s own operating system. It builds a table of all network points in all programs and in the ‘network refresh’ task the system will periodically read and write the points in the table.

So the wait statements in your program there have no effect on the rate which the network writes are performed.

Additionally, the program should run from top to bottom each scan. When the program exits at line 210 is when a lot of action is triggered. All the values of the outputs and global variables in the system are refreshed on program exit. A fan for example, it might be commanded on or off at various points in the program. Lines lower down in the program will override the earlier lines until finally when the program exits at line 210 it will send the state of the fan to the actual outputs. The same goes for variables in the program, they only get refreshed when the program exits at line 210. When the program is done the system will automatically start at the top line on its own, you dont need to tell it to jump up to restart.

Check the ‘program page’ where all programs are listed, any programs that have a run time of up around 100ms are probably in some form of infinite loop and can cause unpredicatable behaviour. Read through this forum about ‘goto’ and you will see many more examples on this ‘program flow’ topic.

Also you can check the ‘network points table’, there you can see a list of all external network points for this partcular controller, you can see the current value and the time since the last refresh.

Do make sure you are are running the latest firmware and T3000.

Standing by to help out.