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
84650members
353990posts

[Imported] Script to generate Crystal Report

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.

sbeadle
Janeway Janeway
Janeway
0 Likes
0
355

[Imported] Script to generate Crystal Report

>>Message imported from previous forum - Category:Scripts and Tips<<
User: admin, originally posted: 2018-10-19 19:45:51 Id:160
This is a re-posting from the obsoleted (October 2018) "Schneider Electric Telemetry & SCADA" forum.

-------------------------------

**_Andrew:
Good morning all, i wrote a script that generates and exports a crystal report (that works fine) after the export the script is supposed to change the value of a few points.
ex._**

_call Server.SetOPCValue("1")
Gen.Interface.Generate
Exp.Interface.Export
call Server.SetOPCValue("2")
call Server.SetOPCValue("3")_

**_value 1 changes, but 2 and 3 do not. What am I missing here?
Thanks, Andre_**

-------------------------------

AWoodland:
SetOPCValue takes two parameters, the property you are changing and the value, make sure you provide both.

____________________________

**_Andrew:
Here is a copy of the exact logic i currently have. It's working until i get to
"call Server.SetOPCValue("~HFOTCO.Pipeline.OMNI.Delivery Data.Points.Product Reset", 1)"_**

_sub endBatchNew
DIM Gen, EXP
Set Gen=Server.FindObject("~HFOTCO.Pipeline.OMNI.Reports.Batch.~OutBound Batch Report")
Set Exp=Server.FindObject("~HFOTCO.Pipeline.OMNI.Reports.Batch.~OutBound Batch Report")
if server.thisobject.checkaccess("CTL") = true then
ret = msgbox("Are you sure you want to end the current batch?", vbExclamation + vbyesno + vbDefaultButton2, "WARNING!!!")
if ret vbyes then exit sub
call server.setopcvalue("~HFOTCO.Pipeline.OMNI.Delivery Data.Points.End Batch and Print",1)
Gen.Interface.Generate
Sleep(15000)
Gen.Interface.Generate
Sleep(5000)
Exp.Interface.Export
sleep(1000)
call Server.SetOPCValue("~HFOTCO.Pipeline.OMNI.Delivery Data.Points.Product Reset", 1)

Attached file: (editor/6f/gax8zjmrut0u.jpg), SFC.jpg File size: 22866

Attachments