Tag Only for the Citect Server and its Local Client

Hi,

Can we in Citect (ver 2018 R2->) create an tag that is "1" only on the server and for the local server client? Meaning any Remote Clients running outside the actual server hardware will read this tag as "0". 

Indicates if the server the application is running on is the server or a client. 

This can be used to start/stop/control local 3'rd party programs running on the server hardware and can only be operated/used directly on this hardware. 

Thanks,

Rune

Parents
  • You could create a local variable that you set/reset on startup using a cicode startup function.

    In that startup function you can figure out if the machine is the server by calling GetEnv("COMPUTERNAME") and comparing it to the known PC name. You could also set the [LAN]Node parameter to a meaningful value in the Citect.ini of the server and use ParameterGet("LAN", "Node", "") to check for that name.

    This startup function should be configured in the Computer Setup wizard for all Citect processes on all machines.
Reply
  • You could create a local variable that you set/reset on startup using a cicode startup function.

    In that startup function you can figure out if the machine is the server by calling GetEnv("COMPUTERNAME") and comparing it to the known PC name. You could also set the [LAN]Node parameter to a meaningful value in the Citect.ini of the server and use ParameterGet("LAN", "Node", "") to check for that name.

    This startup function should be configured in the Computer Setup wizard for all Citect processes on all machines.
Children
No Data