How can I set the digital input and output register

The bit registers are the ones referred as “boolean” in URScript.

Hence below URScript codes are used to interact with bit registers:
read_input_boolean_register(address)
read_output_boolean_register(address)
write_output_boolean_register(address, value)

They are further explained in the URScript Manual.