xpc

How do I change Simulink xPC target serial comm speed on the fly

I have an xPC target application that talks to a device over RS-232. I am using the xPC serial block for this. To talk to this device I first have to start at a default speed, say, 9600 bps, request a change of speed to, say 57600 bps, then change the speed on my side to match it. The problem with the xPC block is that it forces you to c...

Running a Simulink xPC block at a faster rate than the continuous rate

I have a Simulink xPC target application that has blocks with discrete states at several different sample rates and some sections using continuous states. My intention on keeping the continuous states is for better numerical integration. What creates the problem: One block is reading a device at a very fast rate (500 hz). The rest of t...