I need to make a cable to control my servo motor that is controlled over CAN bus, and I was wondering if I can use only 1 cable that is gonna deliver power and CAN communication?
Motor need 48v DC, 24v DC for the break and I think 3 wires for the CAN bus. Question is can I use just 1 shielded cable for everything, or does the CAN communication need to be keept separated from DC power lines?
You can run all those signals and power in a single cable, over different conductors within, as long as your communication interface can cope with all those crosstalk, and your cable can handle the current. CAN is fairly robust against crosstalk, so that may not be a big problem. However delivering all those power is a different story.
You can put DC-DC converters next to the control circuitry and the break to make then accept 48V power, so only one set of 48V power rail is needed, reducing the conductor requirement to 4.
The 48V power requirement is tricky, or I may suggest you try to abuse some USB cables as it is designed to pass power along with a differential pair for high speed signal. USB cables may not have the 50V-rated power conductor you should be expecting, but you can check for newer cable designs that have USB Type-C in mind, and offers thicker and 50V-rated power conductor.