From: Paul on 24 Jun 2010 05:47 Hi, I have a S Function (level 2 in C) in Simulink. I want to use this S Function triggered by a clock - make the entire operations described in S Function only when a rising edge occurs. I build my S function, added it in a Simulink Subsystem, I added to this subsystem a Trigger connected to a clock. Something is not running in the way I want, so I think something is wrong with the settings Sample Time. I'm using: ssSetSampleTime(S, 0, INHERITED_SAMPLE_TIME); ssSetOffsetTime(S, 0, FIXED_IN_MINOR_STEP_OFFSET); is this correct? -------------- Why am I doing this. At the input of the S Function I have a signal sampled with this clock. I want to make an internal 1 sample delay of the signal. If I receive a sample every clock, than I'm using a Data Works for storing the previous sample. The problem is that this Data Works loses some values. I think that maybe something is wrong with timing and there is another event which triggers my functions and writes a new value in my Data Works. --------------- Thanks, Paul
|
Pages: 1 Prev: plotting 2-part function Next: read xls files with name 00000.xls and 00001.xls |