Specifications
RS-232 Synchronous Mode
2-15
8 Set the pre-load function for your Simulink model to load the message
structures when you open your model. For example, if you saved the
message structures in the M-file
RS232_messages, type
set_param(gcs, ’PreLoadFcn’,’RS232_messages.m’)
Note If you do not manually load the message structures before opening
your Simulink model, or have the message structures automatically loaded
with the model, the port connections to the RS-232 driver break.
Your next task is to build and run the target application. However, the example
above only illustrates how to set up the dialog entries when using the Send &
Receive block. Without an external RS-232 device to receive the messages,
and return a reply
"no error\n", this model cannot run successfully on your
target PC. It will block and wait for a reply each time the application sends a
message.