Menu

Scripting BACnet/Eth Tests

Help
Jim Fell
2019-12-11
2019-12-18
  • Jim Fell

    Jim Fell - 2019-12-11

    Is there a way to configure VTS scripts, so that the network connection uses BACnet/Eth (BACnet over Ethernet; i.e. using MAC addresses)?

     
  • John Hartman

    John Hartman - 2019-12-17

    On the "Edit" menu, select "Ports" and configure the port to use Ethernet rather than IP.

    Are you testing ONLY BACnet/Eth, or also BACnet/IP? VTS allows you to create multiple ports - such as one for IP and one for raw Ethernet. However, as the "VTS Survival Guide" (in the docs folder) says

    Define one and only one Port. Otherwise VTS won’t have a default and you will need to pick a Port each time you want to send a message using the message dialogs, and your scripts will need to specify a Port, which makes them less reusable.

     
  • Jim Fell

    Jim Fell - 2019-12-17

    Thanks, John. My question is specifically in regards to scripting BACnet/Eth. For example, in BACnet/IP we may have something like...

      ACTIVENET = 'ip'
      IUT_ADDR = 172.16.1.43
      OBJECT1 = device, 555      -- Product Name
      OBJECT2 = analog-input, 1  -- AMD Airflow
      OBJECT3 = analog-input, 2  -- AMD Temperature
      OBJECT4 = analog-input, 4  -- AMD Alarm Status
      OBJECT5 = analog-value, 1  -- AMD Area
      OBJECT6 = analog-value, 10 -- Traverse Status
    
      SECTION Read Properties of OBJECT1
    
      TEST#1.1 - Read object-identifier
      DEPENDENCIES None
    
        SEND (
        NETWORK = ACTIVENET
        DA = IUT_ADDR
        DER = TRUE
        BVLCI = ORIGINAL-UNICAST-NPDU
        PDU = Confirmed-Request
        Service = ReadProperty
        InvokeID = 0
        SegMsg = 0
        SegResp = 0
        MaxResp = 1476
        Object = 0, OBJECT1
        Property = 1, object-identifier
        )
    
        EXPECT (
        NETWORK = ACTIVENET
        SA = IUT_ADDR
        DER = FALSE
        BVLCI = ORIGINAL-UNICAST-NPDU
        PDU = ComplexAck
        Service = ReadProperty
        Object = 0, OBJECT1
        Property = 1, object-identifier
        OpenTag 3
            AL = {object-identifier}
        CloseTag 3
        )
    

    How should this be modified to work with BACnet/Eth?

     
  • John Hartman

    John Hartman - 2019-12-17

    An exact update (changing a few variable names) of your code would be

      IUT_NET = 'MyEther'
      IUT_ADDR = 112233445566
    
      OBJECT1 = device, 555      -- Product Name
      OBJECT2 = analog-input, 1  -- AMD Airflow
      OBJECT3 = analog-input, 2  -- AMD Temperature
      OBJECT4 = analog-input, 4  -- AMD Alarm Status
      OBJECT5 = analog-value, 1  -- AMD Area
      OBJECT6 = analog-value, 10 -- Traverse Status
    
      SECTION Read Properties of OBJECT1
    
      TEST#1.1 - Read object-identifier
      DEPENDENCIES None
    
        SEND (
        NETWORK = IUT_NET
        DA = IUT_ADDR
        DER = TRUE
        PDU = Confirmed-Request
        Service = ReadProperty
        InvokeID = 0
        SegMsg = 0
        SegResp = 0
        MaxResp = 1476
        Object = 0, OBJECT1
        Property = 1, object-identifier
        )
    
        EXPECT (
        NETWORK = IUT_NET
        SA = IUT_ADDR
        DER = FALSE
        PDU = ComplexAck
        Service = ReadProperty
        Object = 0, OBJECT1
        Property = 1, object-identifier
        OpenTag 3
            AL = {object-identifier}
        CloseTag 3
        )    
    

    However, if you are writing scripts that deal with only a single IUT at any given time, you may be able to simplify things. Take a look at the section "Writing Effective and Reusable Scripts" in the "BACnet Survival Guide." Details of the port, network, and destination address can be defaulted to an "IUT" defined under "Names" on the Edit menu.

     
  • Jim Fell

    Jim Fell - 2019-12-18

    Thanks so much, this was very helpful! I had to make one small change to get it working.

    IUT_ADDR = X'112233445566'

     

Log in to post a comment.