Retarget problem

I am trying to retarget to a remote server and open up a screen.
The following script is on a button and does not work.

system.util.retarget(“Test”, “noaplupcs01:8088/main”,[“Weather”])

It should be the following:system.util.retarget("Test", "noaplupcs01:8088/main", {}, ["Weather"])You are missing a third argument which you can pass in an empty dictionary. Next time, if you get an error, post the details of the error to help us out.

It attempts to work, It opens the Login Screen, (which is set to auto login and does auto login if you just open the project). ???

After loging in the main screen opens not the “Weather”. If you click the goto button for the Weather screen. It just closes the project.

Which version of Ignition are you using?

7.29

I have done some local testing. It does not like Active X running IE. It shuts down everytime after it retargets 1 time. (Ignition exists out). Without Active X , it works ok.

Below is the error code when it closes

A fatal error has been detected by the Java Runtime Environment:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x100034e0, pid=960, tid=7984

JRE version: 6.0_33-b03

Java VM: Java HotSpot™ Client VM (20.8-b03 mixed mode, sharing windows-x86 )

Problematic frame:

C 0x100034e0

If you would like to submit a bug report, please visit:

java.sun.com/webapps/bugreport/crash.jsp

The crash happened outside the Java Virtual Machine in native code.

See problematic frame for where to report the bug.

--------------- T H R E A D ---------------

Current thread (0x036c0400): JavaThread “AWT-EventQueue-0” [_thread_in_native, id=7984, stack(0x04520000,0x04570000)]

siginfo: ExceptionCode=0xc0000005, reading address 0x100034e0

Registers:
EAX=0x100034e0, EBX=0x3366f258, ECX=0x036c0528, EDX=0x3366f600
ESP=0x0456e75c, EBP=0x0456e794, ESI=0x3366f258, EDI=0x036c0400
EIP=0x100034e0, EFLAGS=0x00010287

Top of Stack: (sp=0x0456e75c)
0x0456e75c: 00a39fc7 036c0528 0456e79c 00000008
0x0456e76c: 00a32e21 00000000 0456e774 00000000
0x0456e77c: 0456e7a4 3366f600 00000000 3366f258
0x0456e78c: 00000000 0456e7a4 0456e7cc 00a32f03
0x0456e79c: 3366f5a0 00a382e9 00000008 22ad1c20
0x0456e7ac: 0456e7ac 3366e89b 0456e7d8 3366ef38
0x0456e7bc: 00000000 3366e8c0 0456e7a4 0456e7d4
0x0456e7cc: 0456e7fc 00a32e21 00000008 22ad1c20

Instructions: (pc=0x100034e0)
0x100034c0:
[error occurred during error reporting (printing registers, top of stack, instructions near pc), id 0xc0000005]

Register to memory mapping:

So 7.29 is the local version, what version is the remote server running? Just to be clear, the ActiveX IE component is in the targeted project, not the source project, correct?

The previous testing has been done on the local server.

yes IE is in the target project

Which version of Ignition is the remote server running?

Sorry, all versions are 7.2.11 , Java 1.6.33

I hate to be a downer about this, but (exactly as you discovered) the ActiveX components and re-targeting to not play well together.

We currently do not have any workaround for this, except of course not using ActiveX components.

Carl

Maybe there is a different solution.

What I have is several large TV’s displaying Production data with scrolling screens and I wanted to add a screen showing the current weather, but the client PC does not have internet access, so I was going to pull it off another server thru Active X.

Any other thoughts or a better method.

Does the Gateway have internet access?

Yes it does

Great! There are a lot of ways to skin this cat but the basics are that you want to query for weather conditions on the Gateway, and store the results as something that the Client can read (most likely as tags).

It just so happens that in our Module SDK there is an example of how to write an OPC driver that fetches the weather from Yahoo weather. This would certainly work, but is overkill (downloading the SDK, compiling the example into a *.modl, getting the module signed, etc is a bit of work.)

I would approach it this way: write a python script that runs as a Gateway timer script that fetches the weather and simply writes it to some Memory tags you’ve set up. Conveniently, there is an example of what this script might look like in the User Manual

Thanks Carl

I will do some Testing with your suggestions.

I got one ready to go somewhere around here. Let me see if I can find it…

Okay, here it is. The script, the images, the tags.

[size=200][color=#FF0000]WARNING! DANGER! DANGER![/color][/size]

[size=150][color=#FF0000]Do not do a straight import of the tags. Doing that will replace whatever Tag scheme you have and replace it with just the weather tags![/color][/size]

Instead, export your current tags-- you probably should it twice, one as an easy backup. Just in case. :wink:

Then copy/paste the weather tags into the csv file and re-import.

The script was shamelessly borrowed from IA from a long time ago, the images from somewhere else that I don’t quite remember. :confused:

The Image tag needs to be changed to point to whatever path you will use.

The script is used as a gateway timer script.

I think that covers everything.



Weather.zip (1.92 MB)

[quote=“JordanCClark”]
I think that covers everything.[/quote]

Okay, everything except a window to play with… :laughing: This is in v7.2.11, so you should be able to import it with no issues.
YahooWeather.vwin (19.9 KB)