I have a model that uses two signals and two scopes. On the External Mode Control Panel, I am triggering signal logging of the first signal off of the second signal (a Step block, also seems to occur with a Ramp block). However, I am not logging the second signal. I have the trigger source set to "signal". When I try to connect, Real-Time Workshop downloads the model, but generates the following segmentation violation. This does not occur when I trigger the signal manually or when I log the signal.
<snip> Stack Trace: [0] simulink.dll:int __cdecl gcb_ExtModeSourceBIOIndex(struct slBlock_tag const *,int,int)(0x20813c00, 0, 0, 0x21ea0370) + 15 bytes [1] simulink.dll:void __cdecl MarkSortInfoElementsForTrigSig(struct slBlock_tag const *,int,int,struct SortInfo_tag *)(0x2258b1e0, 0x2686a348, 0, 1) + 136 bytes [2] simulink.dll:struct slErrMsg_tag * __cdecl InitTrigSignal(struct slModel_tag *,struct slBlock_tag *,struct SortInfo_tag *,struct UploadBlkList_Tag * *)(0x20813c00, 0x2258b1e0, 0x2255f994, 0) + 203 bytes [3] simulink.dll:struct slErrMsg_tag * __cdecl InitBdUploadInfo(struct slBlockDiagram_tag const *,struct BdUploadInfo_tag *)(0x206a6e20, 0x2255f980, 0, 0x22fc9390) + 733 bytes <snip>
The complete error messages is included below. A model that reproduces the error is also included below. To reproduce the error:
1. Open the model.
2. Build.
3. Connect. The model runs without error.
4. Disconnect.
5. Open External Signal & Triggering.
6. Set the trigger source to "signal".
7. Reconnect. The model loads, and then the error occurs. You will need to end the MATLAB task from outside the application.
Best Answer