@@ -408,6 +408,30 @@ def set_analog_io(self, signal: str, value: Union[int, float], network: str = ""
408408 payload = {"mode" : "value" , "lvalue" : value }
409409 _res = self ._do_post (f"rw/iosystem/signals/{ network } /{ unit } /{ signal } /set-value?mastership=implicit" , payload )
410410
411+ def get_group_io (self , signal : str , network : str = "" , unit : str = "" ) -> int :
412+ """
413+ This is the same as get_digital_io(). Get the value of a group IO signal.
414+ """
415+ return self .get_digital_io (signal , network , unit )
416+
417+ def set_group_io (self , signal : str , value : int , network : str = "" , unit : str = "" ):
418+ """
419+ Set the value of an group IO signal.
420+ WARNNING: This will just write an int to the group, make sure to convert the value to the correct bit pattern first.
421+
422+ :param value: The value of the signal.
423+ :param signal: The name of the signal
424+ :param network: The network the signal is on. The default `Local` will work for most signals.
425+ :param unit: The drive unit of the signal. The default `DRV_1` will work for most signals.
426+ """
427+ lvalue = value
428+ payload = {"lvalue" : lvalue }
429+ if network and unit :
430+ url = f"rw/iosystem/signals/{ network } /{ unit } /{ signal } /set-value?mastership=implicit"
431+ else :
432+ url = f"rw/iosystem/signals/{ signal } /set-value?mastership=implicit"
433+ _res = self ._do_post (url , payload )
434+
411435 # def get_rapid_variables(self, task: str="T_ROB1") -> List[str]:
412436 # """
413437 # Get a list of the persistent variables in a task
0 commit comments