It may be possible to do it with Pulsin command but... i don't know how efficient it will be.

You must record both Highlevel and LowLevel duration in a table or internal eeprom location, then read them and reproduce them to the output.