Derbyshire 326 for 7 (du Plooy 94, Madsen 67, Haider 54, Mulder 5-55) lead Leicestershire 122 (Brookes 6-20) by 204 runs
The pair shared a stand of 122 from 184 balls with du Plooy failing by six runs to become Derbyshire's first century maker of the season.
Madsen continued his prolific run against Leicestershire with 67 and although 42 overs were lost to the weather, Derbyshire closed on 326 for 7, a lead of 204, and with two days remaining threaten to end the Foxes' bright start to the season.
Leicestershire's head coach Paul Nixon said: "Wiaan has been a groove machine in practice. He has come back this year and his action has been more consistent and he's really confident about his bowling which is wonderful."
Madsen's latest productive shift against Leicestershire bowlers proved that even in uncertain times, there are things you can rely on.
He came into the game averaging 60 in first-class cricket against one of Derbyshire's neighbours so Leicestershire knew they needed to dismiss him quickly to have a chance of staying in the game.
Opportunity knocked in the third over of the morning when Madsen had added only four runs to his overnight total but Colin Ackermann fluffed his lines. Madsen's edge off Chris Wright was regulation as slip catches go but Ackermann standing at second spilled it.
That looked a big moment in the game and by the time a storm swept across the ground shortly before midday, Madsen and Du Plooy were set and ticking along nicely.
At least the break gave the visitors time to regroup but when play resumed in bright sunshine, there was little to trouble the fourth wicket pair. The bowlers were unable to build any pressure with a consistent line and there were too many wide balls for Madsen and du Plooy to score off.
Madsen was first to his fifty which came off 96 balls and when England all-rounder Rehan Ahmed was brought on in the 60th over, du Plooy completed his half century from 74 balls.
Ahmed did almost get through Madsen with a ball that scuttled through but there was nothing else in his three overs which cost 25 runs to threaten the batters.
When the breakthrough did come, it was down to a rash shot from Madsen who dabbed at a ball from Tom Scriven and was caught behind. But by tea, the lead was 177 with du Plooy on 94 and after rain forced a 90-minute delay, he fell to the second ball after the restart.
Leicestershire's decision to claim the second new ball paid off as Finan had du Plooy caught behind off what looked an inside edge which was well taken by Peter Handscomb.
Matt Lamb played on to Mulder and Luis Reece was bowled attempting to hit him back over his head which suggested Derbyshire may declare overnight with further rain forecast to take more time out of the game on Saturday.