Passing data to three 74HC595s

Can you please post the code that doesn’t work, because that is where your problem is and we can’t help if we can’t see what you don’t understand.