New in the Community? Get started here

Schneider Electric Exchange Community

Discuss and solve problems in energy management and automation. Join conversations and share insights on products and solutions. Co-innovate and collaborate with a global network of peers.

Register Now
Geo SCADA Expert Forum
Showing results for 
Search instead for 
Did you mean: 
Lt. Commander

[import] Control a pulse point through VBA.

>>Message imported from previous forum - Category:Scripts and Tips<<
User: ROVSCADAENGINEER, originally posted: 2019-05-07 02:23:21 Id:425
I am trying to pass a pulse to a pulse point and am not sure how to do this in VBA. the script is attached here.
![]((see attachments below) qa/iitgj87l9sye.png "")

I understand that with points you just write a vale to the CurrentValue as either 0 or 1. but I have not been able to figure this out for pulse points.

any help appreciated.

Attached file: (editor/qa/iitgj87l9sye.png), pulse.PNG File size: 104010

Reply User: JesseChamberlain, posted: 2019-05-07 04:02:52
You need to use the relevant control method, look it up in the schema.

As far as I know of the top of my head, it's only internal points that you can use CurrentValue, since the control method happens to have the same name as the method.

Reply User: ROVSCADAENGINEER, posted: 2019-05-07 04:22:17
Cheers jesse! I ended up figuring it out. the solution code is below.

If Not(SQL.Error) Then '

If ToggleCount 1 Then
iResponse = MsgBox ("You are about to reset the pump when there has already been " _
& ToggleCount & " resets this week! Actuating consecutive resets may cause damage to the pump motor. Please request a work order for the site to inspect pump",_
vbExclamation + vbOKCancel + vbDefaultButton1, "Warning")

If iResponse2 = vbOK Then
objPoint.interface.control Active
MsgBox "Pump Reset"
MsgBox "Reset Canceled"
End If

objPoint.interface.control Active
MsgBox "Pump Reset"
End If

If SQL.Error Then
MsgBox SQL.ErrorMessage, vbCritical + vbOKOnly, "Error in SQL Command"
End If
End If




Reply User: geoffpatton, posted: 2019-05-07 14:05:59
Should still be able to write a number to it, Outputs states are Base 0. At least when I control DNP Pulse Null points I write a 0 to objPoint.interface.control and Trip Close points are 0 and 1.