@@ -363,6 +363,15 @@ def get_ramdisk_path(self) -> str:
363363 res_json = self ._do_get ("ctrl/$RAMDISK" )
364364 return res_json ["_embedded" ]["_state" ][0 ]["_value" ]
365365
366+ def get_home_path (self ) -> str :
367+ """
368+ Get the path of the HOME variable on the controller
369+
370+ :return: The HOME path
371+ """
372+ res_json = self ._do_get ("ctrl/$HOME" )
373+ return res_json ["_embedded" ]["_state" ][0 ]["_value" ]
374+
366375 def get_execution_state (self ) -> RAPIDExecutionState :
367376 """
368377 Get the RAPID execution state
@@ -432,7 +441,7 @@ def set_digital_io(self, signal: str, value: Union[bool, int], network: str = "L
432441 lvalue = "1" if bool (value ) else "0"
433442 payload = {"lvalue" : lvalue }
434443 _res = self ._do_post ("rw/iosystem/signals/" + network + "/" + unit + "/" + signal + "?action=set" , payload )
435-
444+
436445 def pulse_digital_io (self , signal : str , duration : int , network : str = "" , unit : str = "" ):
437446 """
438447 Pulse a digital IO signal for a specified duration. The signal will be set to ON for the duration and then set back to OFF.
@@ -444,7 +453,7 @@ def pulse_digital_io(self, signal: str, duration: int, network: str = "", unit:
444453 """
445454 payload = {"lvalue" : "1" , "mode" : "pulse" , "Pulses" : "1" , "ActivePulse" : duration }
446455 _res = self ._do_post ("rw/iosystem/signals/" + network + "/" + unit + "/" + signal + "?action=set" , payload )
447-
456+
448457 def get_analog_io (self , signal : str , network : str = "Local" , unit : str = "DRV_1" ) -> float :
449458 """
450459 Get the value of an analog IO signal.
@@ -488,7 +497,7 @@ def set_group_io(self, signal: str, value: int, network: str = "", unit: str = "
488497 """
489498 lvalue = str (value )
490499 payload = {"lvalue" : lvalue }
491- _res = self ._do_post ("rw/iosystem/signals/" + network + "/" + unit + "/" + signal + "?action=set" , payload )
500+ _res = self ._do_post ("rw/iosystem/signals/" + network + "/" + unit + "/" + signal + "?action=set" , payload )
492501
493502 def get_rapid_variables (self , task : str = "T_ROB1" ) -> List [str ]:
494503 """
0 commit comments