This examples shows a typical software modeling pattern involving services and access to those services in an application.
Driver model represents services provided, read() and write(), related to motion detection.
The chart in the Software model makes calls to the services using the notation slexServicesDriverMdlRef.write(). The notation compactly identifies the function to be called, and the Driver model from where the function's argument attributes are inherited, making this Software model independently compilable.
Simulating the model, and inspecting Sequence Viewer block shows how the chart makes motion detection decisions based on the services.
mdl = 'slexModelingServicesExample'; open_system(mdl); curDir = pwd; cd(tempdir);
close_system(mdl, 0); cd(curDir);