1″ does not equal 1″
MEDState Notation Repository › Forums › Coding Help Archive › 1″ does not equal 1″
- This topic has 4 replies, 1 voice, and was last updated 8 years, 8 months ago by
Med_Support.
-
AuthorPosts
-
August 18, 2017 at 12:21 pm #13584
Med_Support
Moderatortyrsu
Hello!
I have a program that is meant to run for 40 minutes, however I was finding that I would set it going and come back 40 mins later and it would still run for a further 8 minutes.
So yesterday I sat next to it with a timer and found out that for every 1″ that the program counted, 1.2″ would pass in real time, resulting in an extra 12″ every minute, and an extra 8 minutes over the whole program.
My session time code is was the following:S.S.27, \Session Timer S1, \start session timer @ START command #START: SET T = 0 ---> S2 S2, \increment every second 1" : ADD T ---> SX
I have currently fixed it by doing the following:
S.S.27, \Session Timer S1, \start session timer @ START command #START: SET T = 0 ---> S2 S2, \increment every second 1" : SET T = T + 1.2 ---> SX
It is working now but I was wondering if anyone has come across this before or knows what is causing this?
I also tried to fix it using the following:S.S.27, \Session Timer S1, \start session timer @ START command #START: SET T = 0 ---> S2 S2, \increment every second 0.8" : ADD T ---> SX
But that code counted accurately so my time count was off by -0.2 seconds per second. So something is going wrong at 1″ specifically.
I have attached the code as a .txt file if more context is required, (for some reason this forum doesn’t allow .mpc files – I tried to upload one and it deleted my whole post).
Many thanks for your time and help,
SuszieAugust 18, 2017 at 1:20 pm #13585Med_Support
ModeratorGary Bamberger
Hello Suszie,
There are a few possibilities for the problem that you are seeing:
- Your DIG-704 card is defective and needs to be repaired/replaced.
- MED-PC is not running with Real Time Priority. If MED-PC does not have Real Time Priority, then it will lose time.
- You are running an older version of MED-PC and/or the DIG-704 driver and need to update.
- You are running in Emulation Mode. Emulation Mode does not guarantee the timing, but it allows you to test your programs on a computer that doesn’t have hardware.
You should contact MED Associates Support support@med-associates.com directly for help with this problem.
Gary
August 18, 2017 at 4:49 pm #13588Med_Support
Moderatortyrsu
Thanks Gary!
I figured out that it is because whoever installed the program installed it with a time resolution setting of 400 ms, that’s why it works fine for 0.8 ” but not 1″ as 0.8 (but not 1) is divisible by 0.4.
I have fixed the time resolution now to be 10 ms and it is running accurately 🙂
Thanks so much!
SuszieAugust 21, 2017 at 8:46 am #13591Med_Support
ModeratorGary Bamberger
I’m glad that you figured it out. It is very unusual to find the resolution has been changed to 400ms. Going from 10ms to 1ms is very common, but almost nobody does the other direction.
Gary
August 21, 2017 at 7:39 pm #13593Med_Support
Moderatortyrsu
I know – I don’t know what they were thinking!
Increasing it to 100 would have been weird enough – but 400 ms just makes no sense at all.Thanks for all your help, Gary!
-
AuthorPosts
- You must be logged in to reply to this topic.