Convertit une valeur booléenne (BOOL) en "TRUE" ou "FALSE" et écrit le résultat dans la variable STRING cible.
BOOL_TO_STRING évalue l'opérande booléen src (IN) et écrit "TRUE" ou "FALSE" dans la variable STRING cible pour la journalisation de diagnostic ou l'affichage d'état IHM.
STRING cible et l'opérande BOOL source (IN).from automation_machine import ActionQualifier, ActionInstruction
step.add_action("safety_status_str", "Format safety state as text", qualifier=ActionQualifier.P, instruction=ActionInstruction.BOOL_TO_STRING, src="safety_ok")
STRING cibleActionQualifier.P (Impulsion)ActionInstruction.BOOL_TO_STRINGIN) — Variable ou littéral BOOL source