Help - Search - Members - Calendar
Full Version: CX-Supervisor 2.0 Script "display" command
Forums.MrPLC.com > PLCs and Supporting Devices > Omron > CX-Supervisor
PdL
Trying to use the display command in a CXS 2.0 script to display a page:

display("page")

but I get the following error:

IPB Image

This is both in VB script and in CX-Supervisor script mode.
In CXS 1.3 this command works fine. Running CXS 2.01 (1).
Is there any other way to open a page by script ? Am I doing something wrong ?




tashinz
I have just tried to do the same thing - no error displayed. Also have cx-s 2.01 on vista ultimate. the script, on the push button object is:

display("ALARMS")

and cx-supervisor script radio button is checked. as I said, the script interpreter reports no error - after clicking OK everything is ok.
I start the runtime, click the button and it works, the page ALARMS is open.

Hm, what could be the problem Pim?

WAIT...

here is the problem. if I write script display("ALARMS") and THEN check the radio button CX-Supervisor script I get following script:

@VBSCRIPT

display("ALARMS")

@ENDSCRIPT

then in runtime I get the error message like you have. when I delete the @VBSCRIPT and @ENDSCRIPT there is no error in runtime.
obviously they put VB Script to be default but the CX-Supervisor Script radio button invokes @VBSCRIPT and @ENDSCRIPT which marks start and the end of VB Script. probably a little bug.
if you FIRST check CX-Supervisor Script radio button AND THEN write the script it will work.
PdL
Thanks Zoran thumbsupsmileyanim.gif

You're right, it seems the 2 radio buttons work exactly opposite of what they should do - they need to swap the buttons text and then it all works fine ?

In V1.3 it is the same, only it seems the initial default script mode in V2.0 has been set on VB Script instead of CX-Supervisor! Nice one Omron devvers! ranting.gif

IPB Image



Berti Baker
Radio buttons seem to work properly on my machine. Are you missing the point that when you change from VBScript to CX-Supervisor script the editor wraps up any exising VBScript in the @VBSCRIPT / @ENDSCRIPT so that it will still work?

That good isn't it?

The CX-Supervisor script would go outside the tags - then the radio buttons make sense don't they?
Bertie
tashinz
yes, good idea, only the @VBSCRIPT / @ENDSCRIPT wraps existing CX-S script. maybe it is better to insert something like

@VBSCRIPT

insert VB Script code here...

@ENDSCRIPT

and existing CX-S script to be outside of this.

also, when first script editor is opened, the default is VB Script but no @VBSCRIPT / @ENDSCRIPT.
Berti Baker
QUOTE(tashinz @ Oct 18 2007, 11:32 AM) [snapback]60581[/snapback]

... the @VBSCRIPT / @ENDSCRIPT wraps existing CX-S script. ...


Is it existing CX-Supervisor script if the radio button was on VBScript? Surely it was existing VBScript? That's the way I think of it and that seems to make sense.

This seems to work when all old scripts are marked as 'CX-Supervisor Script'. The only confusion I see here is if you start a NEW script, with the default to VBScript and then start writing CX-Supervisor script, and only at the end click 'CX-Supervisor Script' - hence the editor tries to wrap.

Of course if you select the radio button before typing there's no confusion.
tashinz
QUOTE
Of course if you select the radio button before typing there's no confusion.


I agree, also I think that the CX-Supervisor should be default script. user should change it on general preferences.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.