Generally, just once. You don’t have to keep saluting every time an officer walks across an area where you are working;
For instance, as a platoon commander, my guys were on the vehicle park working on vehicles, and I came to check what was happening;
I would only expect the senior soldier or the NCO in charge to salute me ; the rest would carry on working; if I went round each vehicle, I would not be expecting each crew to stop work and salute; “ good morning sir” is all that’s required. If I went away, he would probably salute as I left. If I returned, then there is no need to salute again .
Of course, if not wearing head gear, or carrying something that prevents saluting, then you don’t salute.
In most of my Regiments, we had a “ once a day” rule.
ie a soldier would salute the first time he saw the officer that day; no need to keep saluting every time you meet during the day. “ good morning/afternoon/evening” is all that’s required.
Ctto.