DNP3 Binary Output Operation Via Tag

Is there a way to operate a binary control based on the tag name rather than going directly to the DNP3 driver in the scripting functions?

Fair warning, I’ve never used this driver. Have you reviewed the documentation?
https://docs.inductiveautomation.com/display/DOC81/DNP3

It looks pretty straight forward, Create a tag, and use the mapped points in the Tag Creator. You can also directly address points.

Nothing i tried based on the tag would pulse the binary output.
The only way i have found to toggle DNP Binary Outputs is to talk to the DNP3 driver directly in the python scripting but that is not as nice of a solution as it would be to be able to toggle the tag for the binary output directly

So i have this more or less working using the " [system.dnp3.directOperateBinary] function, but one issue i am having is that the “onTime” parameter is not being respected. I have this connected to an SEL RTAC and that device only sees the pulse for maybe a quarter of a second no matter how large of a value i put in in the onTime parameter in Ignition.

Get a Wireshark capture and we can verify the parameter is being transmitted correctly. You’ll know which company to call for support after that.

I will need to wait until I am on site to properly test this. I am getting the impression that I may be misunderstanding how the hold times are handled in DNP3. I was under the impression that by setting the hold time in Ignition that the point should stay on from the ignition side for that amount of time, but in actuality i think only the end device acting on the control will actually honour that hold on time.

Yes, all the control operations happen in the device itself. Ignition just sends it a command with instructions/parameters when you make the scripting call.

Where I was getting confused is that right now I only have the main SCADA RTU in hand (SEL RTAC) and inside the RTAC it seemed to only getting the message from Ignition for a fraction of a second. i don’t have any device on hand with actual output contacts where i can test that the contact is being held on for the noted time.

Hello BRAD_DAVIS,
Would you mind sharing the parameters used in your [system.dnp3.directOperateBinary] function call.

I used “system.dnp3.directOperateBinary(“Dnp3”, [1], 1, 1, onTime=5000, offTime=5000)”. I got the LATCH_OFF and LATCH_ON controls and not the PULSE_ON and PULSE_OFF that I wanted. TIA.

There’s 5 parameters that follow the device name and indices array, but you only have 4.

Your code would be clearer and the mistakes spotted easier if you used named parameters for all the parameters, e.g.:

system.dnp3.directOperateBinary(deviceName="Dnp3", indexes=[1], opType=1, tcCode=0, count=1 onTime=5000, offTime=5000)

I only used 4 parameters because I was following the Code Snippet in the dnp3 manual. I also simplify it for demonstration.

My actual script is:

  • for closing the breaker
    system.dnp3.directOperateBinary(self.view.params.DeviceName, [self.view.params.IdxCmd], 1, 1, onTime=5000, offTime=5000)

  • for tripping the breaker
    system.dnp3.directOperateBinary(self.view.params.DeviceName, [self.view.params.IdxCmd], 1, 2, onTime=5000, offTime=5000)

Okay, but try explicitly naming the parameters, because I think the user manual example might be wrong/misleading.

It was done this way because I am using one popup for several disconnect devices and breakers. I am passing the parameters to the popup.

Can you give me an example of what you mean? Thanks.

I already did:

Okay thanks. I missed that. I need to put in 5 parameters then.

I think so. I think mixing some named and unnamed parameters + not specifying all the parameters might have strange behavior.

If it still doesn’t work as expected with all the parameters specified then get a Wireshark capture and we can see if the driver is sending out the right command or not.

It did work as per the manual, i just wasnt able to test it without an end device operating the contacts.
I was misunderstanding that the on time delay is only applied in the end device and nowhere else in the chain.

Will do.

Hey all, since it looks like you have done this. What on earth am I missing here please. Communicating with an SEL-3555...

deviceName = "AVSF-RTAC-Substation"
indexes = [0]
opType = 1 #0=NUL, 1=PULSE_ON, 2=PULSE_OFF, 3=LATCH_ON, 4=LATCH_OFF.
system.dnp3.directOperateBinary(deviceName, indexes, opType)

The function returns 0 - success / added to queue, but the tag in the RTAC doesn't update, the time doesn't update. It's like it just heads off in to the void. All settings are default and its set up to direct operate.

Edit: Swapping to "select before operate" makes no difference

Same advice:

  1. use named params, specify all of them
  2. get a Wireshark capture