Hello and Welcome to Justanswer, My name is XXXXX XXXXX I am here to try and assist your with your question
The exhaust gas recirculation (EGR) actuator is a variable position valve that controls the amount of exhaust that enters the intake manifold. The EGR is controlled by the PCM using a pulse width modulated signal that varies from 0-100%. The EGR actuator consists of two components, a valve with actuator (solenoid) and a position sensor to monitor valve movement. The EGR sensor is a potentiometer sensor. When the EGR receives a 5-volt reference signal and a ground from the PCM, a linear analog voltage signal from the sensor will indicate position of the EGR valve.
The PCM will detect an open or short in the EGR control circuit after the KOEO test has run and set a DTC. The EGR actuator can be tested for a stuck or sticking valve by performing an output state low test while monitoring EGRP percentage.
NOTICE: The PCM harness connectors must be properly seated and the connector latch properly attached to eliminate possible driveability concerns or a no-start condition. Installing PCM connectors on an angle may cause an improper connection, misdiagnosis, and damaged components. Install the connector until the lever pivots and seats itself. Apply light pressure to get the connector into position on the PCM and then fully seat the connector.
Note: Visually inspect the harness connectors for corrosion, damage, proper mating and correct pin tension.
Note: When the PCM is disconnected additional DTCs will be set. Clear all DTCs after restoring the vehicle.
the egr valve is not opening and if you replaced the egr valve you have a wiring or computer problem
Note: Note: Visually inspect the vehicle for aftermarket accessories and performance modifications (air filter, exhaust system, intake system, performance chip, turbocharger, etc.). Refer to Section 1 Diesel Electronic Engine Control (EC) System Modifications to OBD Vehicles.
Note: Refer to the PCM and component connector at the beginning of this pinpoint test.
need to preform a egr test with a 2500 dollar scan tool and a laptop additional cost to diag the concern.
if you replaced the egr valve you covered the basics then you have a deeper concern that requires sophisticated expensive equipment.
while driveing the truck to check it out it started surging at times it ran ok then it would surg hard blow black smoke and buck then run fine for awile