Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

  • Explore the new navigation for even easier access to your community.
  • Bookmark and use our new, easy-to-remember address (community.se.com).
  • Get ready for more content and an improved experience.

Contact SchneiderCommunity.Support@se.com if you have any questions.

Close
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
84649members
353989posts

[Imported] Control a pulse point through VBA.

EcoStruxure Geo SCADA Expert Forum

Find out how SCADA systems and networks, like EcoStruxure Geo SCADA Expert, help industrial organizations maintaining efficiency, processing data for smarter decision making with IoT, RTU and PLC devices.

Solved
sbeadle
Janeway Janeway
Janeway
0 Likes
1
807

[Imported] 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

Attachments

Accepted Solutions
sbeadle
Janeway Janeway
Janeway
0 Likes
0
807

Re: [Imported] Control a pulse point through VBA.

>>Responses imported from previous forum


Reply From 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 From 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"
Else
MsgBox "Reset Canceled"
End If

Else
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 From 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.

See Answer In Context

1 Reply 1
sbeadle
Janeway Janeway
Janeway
0 Likes
0
808

Re: [Imported] Control a pulse point through VBA.

>>Responses imported from previous forum


Reply From 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 From 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"
Else
MsgBox "Reset Canceled"
End If

Else
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 From 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.