How to Retain Variables in NX/NJ series during transfer
Introduction
An often asked question on the Sysmac studio is:
Is it possible to save production data, like information stored on some variables in Controller when you download a new program?
The data could include produced quantity, batch status, recipe information, etc.
By default when you download a new or modified program, all non-retained variables in the Controller will be deleted. This is can be a big problem when the machine is in a commissioning phase. There can be a lot of small modifications of the program, which you have to download. During this phase the customers will not want to start from scratch every time a transfer occurs. Online edits can help with this issue but sometimes you must make offline changes then download to the controller.
To ensure the variable keeps its value between transfers, it can be set to retained.
Step 1: Tick the checkbox marked "Retain".
Step 2: Synchronization:
The Default setting is that variables which are marked retained will not be deleted when a new program is transferred to the Controller.
To clear the retained values select the highlighted tickbox in the Synchronization view (the blue marking).
Info
A variable will not keep its status until it is marked retained. This means that if a variable is non-retained at the time of transfer and the status is changed to retained afterward, that variable will be reset. After the status change the variable will be able to maintain its value between transfers.