Showing results 1 to 9 of 9

Thread: VB script bug on client

  1. #1
    Join Date
    21.07.2011
    Posts
    12

    Default VB script bug on client

    Dear Sirs!

    Ihave problem with starting application on client machine. Configuration of SCADA is 1 server 1 client. It's an older project created in zenon 6.01 sp2. Everything is worked properly until system crashing because of power loss in buliding. After this crash, application on server is work normally, but on client after start appears one window with next message: "Object variable or with block variable not set (Error 91)". When I open the debugger, there is a VB script that copying value from one variable to another.
    The script contains just the following command:
    thisProject.Variables.Item("Variable1").Value = thisProject.Variables.Item("Variable2").Value
    Variables are not internal variables.
    This script is defined in project as script that only executing on server. Script is executing on changing one bool variable, on limit2.
    How can I fix this problem with starting client?
    Thank you!
    Albert Nemet
    Novi Sad
    Last edited by anemet : 15th August 2012 at 15:30

  2. #2

    Default Re: VB script bug on client

    Hi Albert,

    Thank you for posting your issue.

    From your description I don't see how the powerloss of the client computer is related to the issue you are seeing now. Was something else changd on the client? Or in the project?

    The runtime client computer will automatically get the current runtime files from the server. You could try and disable VBA on the client for test purposes to see if the project otherwise works normally. (on the client, in the "zenon6.ini" file (in the c:\windows directory for zenon 6.01) in the section [VBA] set "EIN=0")

    Best regards,
    Mark

  3. #3
    Join Date
    21.07.2011
    Posts
    12

    Default Re: VB script bug on client

    Hi!
    Thank you for answer!

    I think nothing changed on client, and in project, but it is possible to somebody set something and I can`t find.

    I tried similar thing (the machine is not close to me and i can`t try what you wrote). I open project in clients editor and erase this VB script. Then compile and starting runtime. The runtime is starting normally, client copy runtime files from server, everything works fine in this case. But after next restarting Windows again appears this error with VB script.

    Albert

  4. #4

    Default Re: VB script bug on client

    Hi Albert,

    Something strange is going on. When you have removed the VBA script from the project, compiled the runtime files and transferred this to the server, and the client has syncrhonized the runtime files from the server, the script is no longer available, and should also not be available after a restart of the client. (Nothing changes in the project on the server or on the client simply on restart of the system)

    As for the VBA makro, you can use triggered allocations to achieve the same functionality without having to resort to a VBA script.

    (triggered allocations however were implemented in a later version than version 6.01)

    An alternative to the triggered allocation could be using a report from the report generator to assign a value from variable 1 to variable 2, or using a recipe group manager recipe with the option "link with PV".

    Both the report generator and the recipe group manager are optional modules however and may not be included in your license.

    Best regards,
    Mark

  5. #5
    Join Date
    21.07.2011
    Posts
    12

    Default Re: VB script bug on client

    Hi Mark,

    Thank you for fast responsing.

    Maybe I don`t say clearly my problem. On server I don`t do anything, there are running Runtime without problems. On client machine I open project in clients editor and erase this VB script. Then compile project and starting runtime on client. The runtime is starting normally on client and after few seconds client copy runtime files from server (as normal), everything works fine in this case. But after next restarting Windows (on client) again appears this error with VB script.

    Best regards,
    Albert

  6. #6

    Default Re: VB script bug on client

    Hi Anemet,

    Compiling the runtime files in the editor on the client, without transferring these to the server, makes no sense. The client will get the (unchanged) runtime files from the server on connect and overwrite the locally compiled runtime files.

    Have you tried the suggestion of disabling VBA on the client?

    Best regards,
    Mark

  7. #7
    Join Date
    21.07.2011
    Posts
    12

    Default Re: VB script bug on client

    Hi!

    SCADA system is not close to me, I`ll try your proposal in a next few days. I`ll inform you about behavior of system.

    Best regards,
    Albert

  8. #8
    Join Date
    21.07.2011
    Posts
    12

    Default Re: VB script bug on client

    Hi!

    I try your proposal. On client machine In "zenon6.ini" file in section [VBA] I set "EIN=0". After starting SCADA RT jump out window with following text: Zenrt32.exe - Entry point not found. The procedure entry ?GetTrbId@CDrvExtension@@UBEGXZ could not be located in the dynamic link library ZENON32.dll.
    When I click on OK, the same message is jump out five or six times, I click on OK on every message. After this SCADA is starting normally, client connects to server and copy RT files and working fine.
    Do you have other tip or trick to start normally Client?
    I attached the screenshot of message window.

    Best regards,
    Albert Nemet
    Attached Thumbnails Attached Thumbnails ErrorMsg.png  

  9. #9

    Default Re: VB script bug on client

    Hi,

    Such a message normally only appears if there is something fundamentally wrong with your installed zenon version.

    E.g. when there is a driver of a different build version than the zenon runtime.

    This message did not appear before? And are you sure you only deactivated VBA in the zenon6.ini? My guess is that when you enable VBA again the message will also still appear.

    I think it is probably best to contact your local COPA-DATA support to get further assistance in sorting out this issue.

    Best regards,
    Mark

Similar Threads

  1. Time Delay in Script execution
    By shikra in forum zenon Supervisor
    Replies: 5
    Last Post: 19th July 2017, 10:04
  2. Zenon 7 - BUG im Scheduler?
    By elso in forum zenon Supervisor
    Replies: 4
    Last Post: 9th April 2013, 01:31
  3. execution order of functions within a script
    By gralex in forum zenon Supervisor
    Replies: 1
    Last Post: 19th May 2011, 09:55
  4. Bug
    By westbaaam in forum zenon Energy Edition
    Replies: 3
    Last Post: 11th November 2009, 09:31
  5. Replies: 3
    Last Post: 17th October 2008, 12:43

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •