Overview
This page provides technical details outlining how each startup mode modifies the computer's settings. It is helpful documentation for instructions on launching the application manually, configuring user login triggers, setting up the application as a Windows service, and understanding available startup parameters for advanced customization.
On this page:
Table of Contents |
---|
|
|
|
Configuration Options
The solution application can run in
Introduction
FactoryStudio projects can run several different ways:
- Local or Remote manual command
- On user login
- Projects as a Service As a Windows Service or Startup bat (On Computer PowerUP)
- Remote OPC Activation
The configuration for these options is a simple radio-box setup. This document describes those options, as well as presents the technical details on the configuration settings applied to the computer, when a selection is name. <<<<please check "when a selection is name". is it correct?>>>>
Info | ||
---|---|---|
| ||
These tools can also setup an Auto-start option in a remote computer. Just connect with a remote ProjectServer. See more information on ProjectServer here. |
- Bat/Shell command
Launching the Application with a Shortcut
TStartup.exe
TStartup.exe is the executable which runs the Solution. There are many different parameters that can be added to the TStartup command line that provide more features to a solution as well as more debugging tools.
In order to use TStartup.exe, you will need to create a shortcut for the executable and edit the shortcut properties to add the parameters.
Creating a TStartup Shortcut
Go to your product’s installation folder (see usual path below), and search for the TStartup.exe application. Right-click it, select Create Shortcut, and copy the file. Then, paste it in any folder.
Code Block |
---|
C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe |
Then, right-click on the created shortcut, select Properties, and change the Target field (command line) as you desire.
Creating a .bat file
A batch file is a script file in DOS and Microsoft Windows. It consists of a series of commands that are executed by the command-line interpreter and are stored in a plain text file.
The following steps describe how to launch a customizable TStartup application with a .bat file:
- Create a text file (extension .txt)
- Write the full command line that will launch the application, as seen below
Code Block |
---|
cd "C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>"
start "C:\Program Files (x86)\ |
TStartup.exe
TStartup.exe is the executable which runs the project. There are many different parameters that can be added to the TStartup command line that provide more features to a project as well as more debugging tools.
In order to use TStartup.exe, you will need to create a shortcut for the executable and edit the shortcut properties to add the parameters.
Launching the Application with a Shortcut
Creating a TStartup Shortcut
Go to your product’s installation folder (see usual path below), and search for the TStartup.exe application. Right-click it, select Create Shortcut, and copy the file. Then, paste it in any folder.
Code Block |
---|
C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe |
Then, right-click on the created shortcut, select Properties, and change the Target field (command line) as you desire.
Creating a .bat file
A batch file is a script file in DOS and Microsoft Windows. It consists of a series of commands that are executed by the command-line interpreter and are stored in a plain text file.
The following steps describe how to launch a customizable TStartup application with a .bat file:
- Create a text file (extension .txt)
- Write the full command line that will launch the application, as seen below
Code Block |
---|
cd "C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>"
start "C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe"
/project:"C:\Projects\MyNewProject.tproj" |
- Add the desired additional parameters (see examples in the next sections)
- Save and close the file
- Right-click the icon and change its extension name form .tex to .bat. A warning message will popup on the screen. Click Yes.
- Double-click the newly created file to launch the TStartup application.
Required Parameters
The most important parameter for launching your application is related to the Project file. It is the only thing that is really necessary for the command line.
The syntax for this parameter is presented below.
Code Block |
---|
/Project:"C:\Projects\Project4.tproj |
After that parameter, you can add any of the remaining available parameters.
"
/Solution:"C:\Solutions\MyNewSolution.tproj" |
- Add the desired additional parameters (see examples in the next sections)
- Save and close the file
- Right-click the icon and change its extension name form .tex to .bat. A warning message will popup on the screen. Click Yes.
- Double-click the newly created file to launch the TStartup application.
Required Parameters
The most important parameter for launching your application is related to the Solution file. It is the only thing that is really necessary for the command line.
The syntax for this parameter is presented below.
Code Block |
---|
/Solution:"C:\Solutions\Solution4.tproj |
After that parameter, you can add any of the remaining available parameters.
Solution AutoStart Setup
Select the Runtime Autostart Option
You can run the solution in any of the following ways:
Start the Solution Manually:
Solutions are started manually:
- From the Solution Management Tool list. To do this, Select a Solution and click the Runtime Startup button or right-click the Solution and select Run Solution.
- When you are configuring the Solution. To do this, go to Runtime → Startup and click Run Startup.
- Creating a windows shortcut to start the Solution.
Service: Application run as a Windows Service and starts when the computer powers up. Setup Windows Service at the Runtime → Startup page
Starting Solutions with a shortcut
Using a Shortcut on Windows Startup
The runtime startup is executed by the program, TStartup.exe.
When using this example, make sure to change the installation path in the script and the software platform version to the installation on your computer.
The Solution is started from a command line window. The following command line parameters are available:
No Format |
---|
/Solution: Solution Path and Name between double quotes
/username: (optional), username that will be used to start the server. If you do not specify, the user guest will be used.
/redundancy: indicates that the server redundancy is being used (requires ip1 and ip2)
/ip1: IP Address of the Primary Server
/port1: TCP port of the Primary |
AutoStart Setup
Select the Runtime Autostart Option
You can run the project in any of the following four ways:
None: Projects are started Manually:
- From the Project Management Tool list. To do this, Select a Project and click the Run button or right-click the project and select Run Project.
- When you are configuring the project. To do this, go to Run → Startup and click Run Startup.
- Creating a windows shortcut to start the Project.
Login: Application starts when an user logs in and stops when user logs out
Service: Application run as a Windows Service and starts when the computer powers up
OPC Activation: Application is activated when the first remote OPC client request is received. In order to be fully OPC compliant, we support OPC client activation. However, it is not recommended in many scenarios, as it allows a remote client's connection status to control whether or not the server application is running.
To set a project to start automatically, use the configuration interface available in the project management tools that are located on the Server tab.
In “Select runtime auto startup mode”, choose the Service option to run the project as a service when the computer starts, and select which project you want. Finally, click the Apply Settings button.
Starting Project manually
We recommend that you manually start your project during development and installation because an operator is needed during these stages. Automated startup is more suitable when the project is setup for production.
Starting Project with an User Login or shortcut
When the second option is selected (Auto-Start with User Login), a shortcut is automatically created and placed on the Windows Startup folder to all users. So when the first user on that computer logs in, the project is started.
This section explains the behind-the-scenes setup that is executed with this option, as well as the details you want to setup that startup shortcut manually.
Using a Shortcut on Windows Startup
The runtime startup is executed by the program, TStartup.exe.
When using this example, make sure to change the installation path in the script and the FactoryStudio version to the installation on your computer.
The project is started from a command line window. The following command line parameters are available:
No Format |
---|
/project: Project Path and Name between double quotes /username: (optional), username that will be used to start the server. If you do not specify, the user guest will be used. /redundancy: indicates that the server redundancy is being used (requires ip1 and ip2) /ip1: IP Address of the Primary FactoryStudio Server /port1: TCP port of the Primary FactoryStudio Server /ip2: IP Address of the Secondary FactoryStudio Server /port2: TCP port of the Secondary FactoryStudio Server /viewonly: indicates that the projectSolution is in view only mode /wa: indicates that the projectSolution uses Windows Authenticatio |
The modules that will be started are configured in the project Solution and are located at Run → Startup.
Info | ||
---|---|---|
| ||
"C:\Program Files\Studio\fs-8.1\TStartup.exe" /projectSolution:"C:\Studio ProjectsSolutions\Project1Solution1.tproj" |
More information on the parameters for the TStartup application are located here <<<<<<<. link startup open >>>>>>>>>>>>>>>>>>>>>>
Creating a Windows shortcut
Go to Start → All Programs. Right-click the startup folder, and select Open.
- In the Startup folder, right-click and select New → Shortcut.
- In the Create Shortcut window, paste the path into the field that displays. <<<<.please check this sentence. what should be pasted? all three options above?>>>>
- If you are not using redundancy, delete the redundancy part of the text.
In the examples below, be sure to change the installation path and version of FactoryStudio software platform to the installation on your computer.
- Type or paste the full command line. For example: "C:\Program Files\Studio\fs-8.1\TStartup.exe" /projectSolution:"C:\Studio ProjectsSolutions\Project1Solution1.tproj"
- Click Next.
- Enter a name for the shortcut.
- Click Finish.
The project will automatically start on the next user login if you place that startup icon on the Windows Startup folder. Or you can use the shortcut to start the application manually..
Auto-Start the Project as a Windows Service
When the third second option is selected, Auto-Start running as a Windows Service, the project will start running when the computer powers up. The Windows Service starts the application as soon as the computer is powered on and the Windows Operating System starts, even if no user has logged in to Windows.
The Windows Service can be used on production servers that need different Windows user to login to the computer and keep the server side runtime components running at all times. Use the Windows Service on production servers that are not being used as engineering stations if you need the ability to differentiate between the logged in Windows users while the project is running.
This section explains the behind-the-scenes setup on the Windows Service that is executed with this option, as well as the details you want to move the Windows Services configuration.
Info | ||
---|---|---|
| ||
When running as a Windows Service, you cannot start the Client Displays, as the service server side components run independently from any user logged in. Refer to Running Displays Clients <<<<< link >>>>>>>> section of the manual for information on starting client side applications. |
- Click Next.
- Enter a name for the shortcut.
- Click Finish.
The Solution will automatically start on the next user login if you place that startup icon on the Windows Startup folder. Or you can use the shortcut to start the application manually..
Auto-Start the Solution as a Windows Service
When the third second option is selected, Auto-Start running as a Windows Service, the Solution will start running when the computer powers up. The Windows Service starts the application as soon as the computer is powered on and the Windows Operating System starts, even if no user has logged in to Windows.
The Windows Service can be used on production servers that need different Windows user to login to the computer and keep the server side runtime components running at all times. Use the Windows Service on production servers that are not being used as engineering stations if you need the ability to differentiate between the logged in Windows users while the Solution is running.
This section explains the behind-the-scenes setup on the Windows Service that is executed with this option, as well as the details you want to move the Windows Services configuration.
Info | ||
---|---|---|
| ||
When running as a Windows Service, you cannot start the Client Displays, as the service server side components run independently from any user logged in. Refer to Running Displays Clients section of the manual for information on starting client side applications. |
Running the Solution as a Windows Service
Tip | ||
---|---|---|
| ||
On the Designer tool, navigate to Runtime → Startup. At that page, you find the option to setup the solution to run as a Service, that is only the configuration you need to do! The entire section that follows, just explain in details the process that was executed when giving that command, and present the details in case there is a scenario you need to setup manually the Windows Services. |
When running the application as a Windows Service, you need to take 4 four actions:
- Setup the Run-time startup: By using the FactoryStudio software platform configuration tools or directly editing the Windows Service system, you define a FactoryStudio project software platform Solution to start as a Windows Service that will run the “server” components of the projectSolution. The graphical user interface always runs in a Windows User Mode in the same computer or started in a remote computer.
- Setup a Web Server: If you want remote access to this project Solution — for project Solution configuration or to access the displays in runtime —, you need to setup a Web Server. This is accomplished with the built-in TWebServer software or with the Microsoft IIS (Internet Information Services). Refer to the <<<<<<<<< this link >>>>>>>>>>> TWebServices page about installing a Web Server Server.
- Verify the security settings: Verify the security settings of the Windows Service and the security settings of the project, using this procedure <<<<< ANCHOR >>>>>>. to this pagethe Solution
- Define the client startup: When a FactoryStudio project software platform Solution is starting as a Windows Service, the Displays will not run, despite the project Solution configuration, due to the restrictions of it running as a service. Therefore, you need to setup the client displays, either in a startup shortcut on the same computer or in a remote computer. Information on starting client displays can be located here <<<<<<<<<<. >>>>>>>>>>>>>>>>>>>>>>>>>
In “Select runtime auto startup mode”, choose the Service option to run the project as a service when the computer starts, and select which project you want. Finally, click the Apply Settings button.
When the Apply Settings button is clicked. the following actions are automatically executed by the platform
- , either in a startup shortcut on the same computer or in a remote computer. Information on starting client displays can be located here <<<<<<<<<<. >>>>>>>>>>>>>>>>>>>>>>>>>
1) A Command line, based on the project Solution configuration is created. The whole command line should look something like this:
No Format |
---|
"C:\ProgramFiles(x86)\Tatsoft\FactoryStudio\fs-8.1\ tStartup.exe" /projectSolution:C:\Factory Studio ProjectsSolutions\ <project<Solution_name>.tproj /username:<username> |
2) A command at the <.NET Framework Install Path> is executed:
No Format |
---|
installutil <InstallPath>\<fs-version>\TStartupAsService.exe Example: C:\Windows\Microsoft.NET\Framework\v2.0.50727>installutil C:\Program files\Tatsoft\FactoryStudio\fs-8.1\ TStartupAsService.exe |
3) In the Windows Registry, the following entry is added
No Format |
---|
"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\ TStartup\ImagePath" Example: "C:\\tatsoft\fs-8.1\TStartupAsService.exe" "/projectSolution:C:\FactoryStudio ProjectsSolutions\Project1Solution1.tproj" |
4) In the Windows Service (Administrative Tools), the "TStartup Service" is set to automatic, so the selected project Solution will start when the computer starts.
Check the Windows Service Security Settings
Check the Windows Security settings for Log On.
When you setup the project Solution to run as a Windows Service, it will run by default under the built-in “Local System” Window Credentials. For some projectsSolutions, especially if accessing external databases or folders, you may need to run under a specific user's Windows Security Log On credentials. The configuration is executed in the Windows Service Configuration directly. For most scenarios, the default configuration will suffice.
Optionally, you can delay the start of the service
If the application is using external resources, services, or applications, you may want to delay the start of the project Solution to allow the other services to start first. This is also executed in the Windows Service configuration.
Setup the Security in
the Projectthe Solution Configuration
ProjectSolution
When the application is running as a service, the server components will run under the credentials of the “project “Solution user” defined in Run Runtime → Startup. By default, the user is a “guest”. For most projectsSolutions, that user will be changed to Administrator, which will allow the user to make changes to the project with online configuration or have access to all application objects.
to make changes to the Solution with online configuration or have access to all application objects.
Startup Parameters
Main parameters
/ip1
The Primary Server Name or IP
The target of your shortcut will be something like this:
"
Starting the Module Monitor interfaces
When you start the application in the user mode, you have the TStartup.exe application, which shows a dialog page with all the modules running, and you can start and stop the modules individually using that interface. The application is not visible when the project server (TServer application) is started as a Windows Server.
If you want to access the same interface when running as a service, you need to start the PropertyWatch.exe located in the FactoryStudio installation folder (typically, C:\Program Files (x86)\Tatsoft<CompanyName>\FactoryStudio\fs-2014.2\PropertyWatch.exe).When running as a service, you need to define the parameters /ip1 and /port1 with the computer name or with the computer IP. The default configuration will not allow a connection in this case. You can define other optional parameters, such as /username. E.g.: <ProductName>\<ProductVersion>\TStartup.exe" /Solution:"C:\ Solutions\Solution4.tproj" /ip1:<IpAddress>
/port1
The Port number of the primary, default is 3101.
The target of your shortcut will be something like this:
Startup Parameters"C:\Program Files (x86)\Tatsoft\FactoryStudio\fs-2016.2\PropertyWatch.exe" /ip1:W10-VS /username: Administrator
Another way to start these tools is to open the project configuration, Run Startup, and click the connect button. This will enable a button on that dialog that will open the monitoring Tools.
Note |
---|
In order to setup Microsoft IIS, see the project documentation. |
<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /Solution:"C:\ Solutions\Solution4.tproj" /ip1:<IpAddress> /port1:<PortNumber>
Advanced Diagnostic Information
The list below contains the available parameters that can be added to a projectSolution's startup for additional debugging information.
/debugstartSaveLog: (log option)
The logs are created in the folder:
C:\ProgramData\<ProductName>\Users\Public\Documents\<ProductName>\TraceLogs
It is worth remembering that this folder is used to log system errors. When a critical error occur, this folder will contain important information that can be used to solve the issue.
The log options available are: 0 - disabled and 3 - debug.
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /ProjectSolution:"C:\ ProjectsSolutions\Project4Solution4.tproj" /debugstartSaveLog:3
/AutoRunDiagnostics: (time in minutes)
The logs are created in the folder:
C:\ProgramData\<ProductName>
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /ProjectSolution:"C:\ ProjectsSolutions\Project4Solution4.tproj"/AutoRunDiagnostics:30
/LogDeviceWriteStartup
The logs are created in the folder:
C:\ProgramData\<ProductName>\Device
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /ProjectSolution:"C:\ ProjectsSolutions\Project4Solution4.tproj"/LogDeviceWriteStartup
Redundancy
/redundancy
It has no parameters. It just needs to be included to enable redundancy.
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /ProjectSolution:"C:\ ProjectsSolutions\Project4Solution4.tproj"/redundancy
/autoswitch
It has no parameters. If included, the Primary takes over as the Active node if the secondary was acting as the Active.
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /ProjectSolution:"C:\ ProjectsSolutions\Project4Solution4.tproj"/redundancy /autoswitch
/timeautoswitch
The number of seconds the Primary will wait before becoming active if the autoswitch option is enabled. This is typically set to 60 seconds.
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /ProjectSolution:"C:\ ProjectsSolutions\Project4Solution4.tproj"/redundancy /timeautoswitch:30
/ip1
The Primary Server Name or IP
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /ProjectSolution:"C:\ ProjectsSolutions\Project4Solution4.tproj" /ip1:<IpAddress>
/port1
The Port number of the primary, default is 3101.
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /ProjectSolution:"C:\ ProjectsSolutions\Project4Solution4.tproj" /ip1:<IpAddress> /port1:<PortNumber>
/ip2
The Secondary Server Name or IP
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /ProjectSolution:"C:\ ProjectsSolutions\Project4Solution4.tproj" /ip1:<IpAddress> /ip2:<IpAddress>
/port2
The Port number for the secondary, default is 3101.
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /ProjectSolution:"C:\ ProjectsSolutions\Project4Solution4.tproj"/ip1:<IpAddress> /ip2:<IpAddress> /port2:<PortNumber>
/connectiontimeout
The Watch-dog timeout in seconds that is found on Info → Redundancy.
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /ProjectSolution:"C:\ ProjectsSolutions\Project4Solution4.tproj" /connectiontimeout:5
/connectionretry
The Connection retry attempts. By default, it is set as 1.
/ProjectIPPathSolutionIPPath
The path of the project Solution on the remote server.
The ProjectIPPath SolutionIPPath is used by the system to allow one station to automatically update the project Solution in the redundant pair when doing online project Solution changes and HotStart commands.
Example:
/ProjectIPPathSolutionIPPath:192.168.0.1;C:\ProjectsSolutions\test.tproj
Info | ||
---|---|---|
| ||
The TimeAutoSwitch time is connected when you are using the /autoswitch option. In this scenario, when the computer designed as the Primary starts, it will ”auto switch” from standby to active after it starts. |
It is important that the switch happens only after the process had time to get all the synchronization from the active computer. Typically, 60 seconds should be enough for that, but you should increase that settings for large projects Solutions or slow networks.
Advanced Parameters
/username
The RuntimeUser that is logged in.
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /ProjectSolution:"C:\ ProjectsSolutions\Project4Solution4.tproj" /username:<UserName>
/password
The custom password to log in as the user defined above.
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /ProjectSolution:"C:\ ProjectsSolutions\Project4Solution4.tproj"/username:<UserName> /password:<Password>
/wa
Flag (True or False) to set if Windows Authentication will be used.
- True:
- False = Remote
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /ProjectSolution:"C:\ ProjectsSolutions\Project4Solution4.tproj" /wa:true
/port1WA
The listening port using Windows Authentication
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /ProjectSolution:"C:\ ProjectsSolutions\Project4Solution4.tproj" /wa:true /port1Wa:<PortNumber>
/NumberOfDevicesAtSameTime
The number of devices online at the same time. By default, it is set as 3.
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /ProjectSolution:"C:\ ProjectsSolutions\Project4Solution4.tproj" /NumberOfDevicesAtSameTime:1
/TimeBetweenModules
The waiting time between modules being started. Time in seconds.
The target of your shortcut will be something like this:
"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /ProjectSolution:"C:\ ProjectsSolutions\Project4Solution4.tproj" /TimeBetweenModules:30
/nocache
Flag (true or false) to see if project will use data stored in cache or not. For SmartClient Only.if Solution will use data stored in cache or not. For SmartClient Only.
The target of your shortcut will be something like this:
http://<IpAddress>/<ProductVersion>/TSmartClient.application?nocache=true
/AutoCheckWatchDog
It enables automatically restarting the channel if no increment occurs for 3 minutes, which helps prevent system interruptions from freezes or malfunctions.
The target of your shortcut will be something like this:
http://<IpAddress>/<ProductVersion>/TSmartClient.application?nocache=true"C:\Program Files (x86)\<CompanyName>\<ProductName>\<ProductVersion>\TStartup.exe" /Solution:"C:\ Solutions\Solution4.tproj" /AutoCheckWatchDog
In this section
...:
Page Tree | ||||
---|---|---|---|---|
|