# Retarget problem

**URL:** <https://forum.inductiveautomation.com/t/retarget-problem/4744>\
**Category:** Ignition\
**Created:** [July 2, 2012, 3:19pm UTC](https://forum.inductiveautomation.com/t/retarget-problem/4744 "2012-07-02T15:19:03Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jerry\_H](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@Jerry\_H](https://forum.inductiveautomation.com/u/Jerry_H)\
**Post date:** [July 2, 2012, 3:19pm UTC](https://forum.inductiveautomation.com/t/retarget-problem/4744/1 "2012-07-02T15:19:03Z")

</div>

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”])

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [July 2, 2012, 3:20pm UTC](https://forum.inductiveautomation.com/t/retarget-problem/4744/2 "2012-07-02T15:20:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Jerry\_H](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@Jerry\_H](https://forum.inductiveautomation.com/u/Jerry_H)\
**Post date:** [July 2, 2012, 3:34pm UTC](https://forum.inductiveautomation.com/t/retarget-problem/4744/3 "2012-07-02T15:34:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![James.Lorenz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/james.lorenz/32/3290_2.png) [@James.Lorenz](https://forum.inductiveautomation.com/u/James.Lorenz)\
**Post date:** [July 2, 2012, 5:01pm UTC](https://forum.inductiveautomation.com/t/retarget-problem/4744/4 "2012-07-02T17:01:03Z")

</div>

Which version of Ignition are you using?

---

<div class="post-metadata">

**Author:** ![Jerry\_H](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@Jerry\_H](https://forum.inductiveautomation.com/u/Jerry_H)\
**Post date:** [July 2, 2012, 5:06pm UTC](https://forum.inductiveautomation.com/t/retarget-problem/4744/5 "2012-07-02T17:06:17Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Jerry\_H](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@Jerry\_H](https://forum.inductiveautomation.com/u/Jerry_H)\
**Post date:** [July 2, 2012, 5:10pm UTC](https://forum.inductiveautomation.com/t/retarget-problem/4744/6 "2012-07-02T17:10:26Z")

</div>

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](http://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:

---

<div class="post-metadata">

**Author:** ![James.Lorenz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/james.lorenz/32/3290_2.png) [@James.Lorenz](https://forum.inductiveautomation.com/u/James.Lorenz)\
**Post date:** [July 2, 2012, 5:17pm UTC](https://forum.inductiveautomation.com/t/retarget-problem/4744/7 "2012-07-02T17:17:55Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Jerry\_H](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@Jerry\_H](https://forum.inductiveautomation.com/u/Jerry_H)\
**Post date:** [July 2, 2012, 5:23pm UTC](https://forum.inductiveautomation.com/t/retarget-problem/4744/8 "2012-07-02T17:23:53Z")

</div>

The previous testing has been done on the local server.

---

<div class="post-metadata">

**Author:** ![Jerry\_H](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@Jerry\_H](https://forum.inductiveautomation.com/u/Jerry_H)\
**Post date:** [July 2, 2012, 5:24pm UTC](https://forum.inductiveautomation.com/t/retarget-problem/4744/9 "2012-07-02T17:24:34Z")

</div>

yes IE is in the target project

---

<div class="post-metadata">

**Author:** ![James.Lorenz](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/james.lorenz/32/3290_2.png) [@James.Lorenz](https://forum.inductiveautomation.com/u/James.Lorenz)\
**Post date:** [July 2, 2012, 5:26pm UTC](https://forum.inductiveautomation.com/t/retarget-problem/4744/10 "2012-07-02T17:26:22Z")

</div>

Which version of Ignition is the remote server running?

---

<div class="post-metadata">

**Author:** ![Jerry\_H](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@Jerry\_H](https://forum.inductiveautomation.com/u/Jerry_H)\
**Post date:** [July 2, 2012, 5:35pm UTC](https://forum.inductiveautomation.com/t/retarget-problem/4744/11 "2012-07-02T17:35:32Z")

</div>

Sorry, all versions are 7.2.11 , Java 1.6.33

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [July 2, 2012, 5:57pm UTC](https://forum.inductiveautomation.com/t/retarget-problem/4744/12 "2012-07-02T17:57:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Jerry\_H](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@Jerry\_H](https://forum.inductiveautomation.com/u/Jerry_H)\
**Post date:** [July 2, 2012, 6:12pm UTC](https://forum.inductiveautomation.com/t/retarget-problem/4744/13 "2012-07-02T18:12:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [July 2, 2012, 6:42pm UTC](https://forum.inductiveautomation.com/t/retarget-problem/4744/14 "2012-07-02T18:42:29Z")

</div>

Does the Gateway have internet access?

---

<div class="post-metadata">

**Author:** ![Jerry\_H](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@Jerry\_H](https://forum.inductiveautomation.com/u/Jerry_H)\
**Post date:** [July 2, 2012, 6:48pm UTC](https://forum.inductiveautomation.com/t/retarget-problem/4744/15 "2012-07-02T18:48:02Z")

</div>

Yes it does

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [July 2, 2012, 7:10pm UTC](https://forum.inductiveautomation.com/t/retarget-problem/4744/16 "2012-07-02T19:10:21Z")

</div>

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](http://www.inductiveautomation.com/support/usermanuals/ignition/index.html?system_net_httpget.htm)

---

<div class="post-metadata">

**Author:** ![Jerry\_H](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@Jerry\_H](https://forum.inductiveautomation.com/u/Jerry_H)\
**Post date:** [July 2, 2012, 7:12pm UTC](https://forum.inductiveautomation.com/t/retarget-problem/4744/17 "2012-07-02T19:12:45Z")

</div>

Thanks Carl

I will do some Testing with your suggestions.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [July 2, 2012, 7:30pm UTC](https://forum.inductiveautomation.com/t/retarget-problem/4744/18 "2012-07-02T19:30:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [July 2, 2012, 7:46pm UTC](https://forum.inductiveautomation.com/t/retarget-problem/4744/19 "2012-07-02T19:46:44Z")

</div>

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. 😉

## 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. 😕

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.

 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/0/059f3be201c10292f7389b1497e617fb29a22414.png)  
  
[Weather.zip](https://us1.discourse-cdn.com/inductiveautomation/original/2X/8/8bd64dca664eaf689e4848f42645ade51f708372.zip) (1.92 MB)

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [July 2, 2012, 7:56pm UTC](https://forum.inductiveautomation.com/t/retarget-problem/4744/20 "2012-07-02T19:56:02Z")

</div>

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

Okay, everything except a window to play with… 😆 This is in v7.2.11, so you should be able to import it with no issues.  
[YahooWeather.vwin](https://us1.discourse-cdn.com/inductiveautomation/original/2X/2/219aa7d07d6eb4a1d2ad50608267fef356c91305.vwin) (19.9 KB)
