We want to automate process of running models from remote machine. Does this work in Tecnomatix ?
Machine A ( no Tecnomatix installed ) - Need to trigger execution of model - start and stop on machine B from machine A
Machine B will have Tecnomatix installed with all model files.
Does anyone did this successfully before ? Or can throw some lights on how this can be accomplished.
There is a couple of different ways to approach this, 1 would be using a HTML page and the built in web server. (never tried it across 2 machines though)
You can create a static web page (for machine 1) which will use the 'OpenModel' web command to tell machine 2 to open the model. From here you can then access another page generated by the model which has links to run methods that start or stop the simulation, as well as a link to load a page (or a iFrame with a refreash rate on it for 10 seconds or so) which can tell you about information about the model running and its current condition.
All of this is possible, but will take some time to try to set up to work correctly, it will also rely on keeping Plant Sim running and knowing the correct port for it (every new instance of Plant Sim gets given the next free port, but they all start at 30001, so second instance is 30002 which includes if you open a new plant sim before the old one has fully closed.
Another thing you could do is look into the Socket Interface, from here you can then use a TCP socket connection to send signals to the currently running Plant Sim model, the benfit of this is the port is fixed so you could use a different port for each model to ensure you dont talk to the wrong model. The downside is you might need to create a new program to run on machine 1 to send and recive the signals and convert them to something userable for the end user.
From what I have looked into, am not to sure if any other methods would help you much.
You can use the COM interface of Plant Simulation.
Just save the following lines in a file with extension "js":
var PlantSim= new ActiveXObject("Tecnomatix.PlantSimulation.RemoteControl", "localhost"); PlantSim.SetVisible(true); PlantSim.LoadModel("c:\\Test.spp");
This will start Plant Simulation on the local host and will try to load the model C:\Test.spp.
If you want to start Plant Simulation on a remote host you have to configure DCOM security using dcomcnfg.exe. This is described in the online manual. Recently we figured out that on some machines it's necessary to specify a specific user for the remote machine instead of the launching user to make it work.
Could you shed more lights on what needed on remote client machine, like I think you need to have few dlls to make ActivexObject to work?
Could you post link on GTAC which you are referring to here ?
In products manual I find some reference under Tools -> Experiment Manager but that's not helpful.
I was referring to the topic "Configuring DCOM on the Remote Computer on Windows Vista, Windows 7, and on Windows 8" in the online manual.
And please note my remark that on some machines it's necessary to specify a specific user for the remote machine instead of the launching user to make it work.