0

Problem

I originally posted this question which was apparently something that did not meet my customer spec. Hence I am redefining the problem:

To understand the problem a bit more, the timing diagram on the original post can be used. The delayer needs to be platform independent. To be precise, I run a job scheduler and apparently my current delayer is not going to be compatible with it. What I am stuck with is the "Independent" bit of the delayer. I have already knocked out a delayer in SIMULINK using Probe (probes for Sampling Time) and Variable Integer Delay blocks. However, during our acceptance phase we realised that the scheduler does not comply with such configuration and needs to be something more intrinsic and basic - something like a while loop running in C/C++ application.

Initial Solution

What I can think of a solution is the following:

  1. Define a global and static time-slice variable called tslc. Basically, this is how often the scheduler runs. The unit could be in seconds

  2. Define a function that has the following body:

    void hold_for_secs(float* tslc, float* _delay, float* _tmr, char* _flag) {
         _delay[0] -= tslc[0];
         if (_delay[0] < (float)(1e-5)) {
    
            _flag[0] = '1';     
    
         } else {
    
               _flag[0] = '0';            
    
         }
    
    }
    

Users please forgive my poor function-coding skilss, but I merely tried to come up with a solution. I would really appreciate if people help me out a little bit with suggestions here!

Computing Platform Windows 2000 server

Target computing platform An embedded system card - something similar to a modern graphics card or sound card that goes along one of the PCI slot. We do testing on a testbed and finally implement the solution on that embedded system card.

Community
  • 1
  • 1
ha9u63a7
  • 6,233
  • 16
  • 73
  • 108
  • I'm not at all sure that what you are asking for is sensibly possible without platform-specific OS support. What magnitude of delay are you seeking, uS or hours? – Martin James Aug 27 '13 at 00:18
  • @MartinJames I should have clarified that we do have an OS running. Our testbed uses Windows 2000 server OS. However, we have a specialised embedded system in the form of a card (like graphics card or sound card) that will be used as the final system. And my delay magnitude varies from ms to s - if that makes sense. – ha9u63a7 Aug 27 '13 at 07:24
  • General advice - write a stand-alone question, instead of referring to another post. The question itself, without links, should explain what you want. – ugoren Sep 01 '13 at 11:42

0 Answers0