Loading a value in client tag at startup

I have a ignition project that serves as HMI for 9 similar machines. Each machine has a panel PC on which I launch the client.
To link the client to a machine I have a client tag with a machine number.
Every time I start up a client it automatically comes up with the machine number I entered the first time I created the project.
How can I make each client to “remember” the machine number that was in the client tag before the client was shut down?

Thanks.

Ignition Version 7.5.10

How about setting the machine number according to the clients IP address by using the sytem.net.getIpAddress() function?

Another option is, in Client Events Scripts - Shutdown, to store the client tag value in a file local to the computer (for Windows 7, use C:\users\public) and later, in Client Event Scripts - Startup, read from the same file to populate the Client tag.

That works great, Thank you.

I used the following script:

[code]ip = system.net.getIpAddress()

if ip == "10.20.0.253":
system.tag.writeToTag('[Client]Client_Inv_Num', 2870101)

elif ip == "10.20.0.254":
system.tag.writeToTag('[Client]Client_Inv_Num', 6870101)[/code]