It's pretty tough to troubleshoot the code you didn't post. Please try again. 🤔 (I for one would appreciate "Save for Previous Version..." back to 2016 or earlier).
Very generally, this sounds pretty solvable with the right combo of hardware signal sharing and appropriate dataflow in your programming. Both are needed to get your tasks properly sync'ed.
You probably should be making sure the encoder task starts first before you generate the pulse train that will be shared by both your encoder task and the external camera. You also need to have the encoder task configured properly for using that pulse train as a sample clock.
Post the code (LV 2016 or earlier, please) & I'm pretty sure I can help.
-Kevin P