If egr is enabled in the ecm then it will not be possible. Too many interrelated parameters where actual measured won't measure predicted...especially without functional aftertreatment sensors.
Best option is use a tuner to disable egr & dpf. Then find something to control the valve independently. Best hope for controlling through ECM is if EFI provides user defined table mm3 vs EMP with EGR control values. Again, one would still need the "EGR disabled", but EFI would be sending the control independently. Essentially you need to create a new closed loop control method and bypass the old.
Also, it's better to just use the EBV // EGR Cooler bypass valve, not the EGR valve. This assumes you want to just connect to the flange on the passenger side and remove the actual EGR valve & throttle valves.