Device 5v to 24v input on mbed


I got a task to connect an industrial mbed rail module
that runs on 24v. Inputs are 24v. Plz check.

I am connecting an optical measuring device that uses 5v.

Will this measurement device be able to trigger the inputs on the 24v rail? Gnd to Gnd and Pin to pin?
Do i need any other device in between.?

Thank you in advance.