Splash screen and audio issue


ccdubs

Recommended Posts

Hi,

I have just installed a runtime version of DF onto a PC that was previously being run from a laptop. The program has a main routine which is set to autostart and the window starts in full screen mode. This has caused 2 problems:

1) the splash screen doesn't disappear (or does only after a very long while 1-2 minutes). I have found that if i click on my loaded DF page that it then disappears.

2) i have some wmv files that play when the user presses the activation buttons. For some reason these don't play. The PC sound is working as I have played these wmv's through Windows Media Player. While trying to fault find the issue I did manage to hear one of the sounds after switching away from full screen mode. This wasn't repeatable.

When using the laptop everything runs perfectly. The PC is running XP Home and is about 2.4GHz with 500 MB of RAM. I have noticed that mouse movement is "jerky" when my DF program runs.

Thanks for any help.

Link to comment
Share on other sites

Sounds to me like an issue with your .ctl document. Probably related to missing hardware, or something else that exists on your old machine, but is failing on the new machine. Depending on how your document is setup, this may be triggering an infinite loop of some sort, which is causing the "jerky" movement, which is an indicator that your processor power is being used up completely. This would also cause the other two symptoms you are seeing.

Link to comment
Share on other sites

Thanks support,

Is it possible this is a RAM issue?

The only hardware that my program uses is the serial com card and the audio card. I perform Modbus comms over the serial port to a PLC.

The audio playback is only initiated on user action but the splash screen and mouse issue are there even before the user presses the button the first time.

I can try connecting to the PLC with a USB to serial converter if you think that would be worth a try.

Link to comment
Share on other sites

Yes, actually now that I look at your specs more closely, it is almost certainly a RAM issue. You really can't run XP on less than 1 gig (vista requires 2 gig, 2000 Pro can run on 512). Just loading XP uses 200 meg or so minimum, and that's if you have a real clean installation. If you have anti-virus and other unnecessary programs running, it will eat into this to the point of having nothing left. Depending on your app and your channel history settings, DAQFactory can use quite a bit of memory. If you run out, the system goes to cache, meaning it starts to use the harddrive as RAM and the harddrive is very SLOW compared to ram.

Link to comment
Share on other sites

OK, RAM has been boosted and new graphics and audio cards installed.

The splash screen problem has gone and the sound issue is partially resolved. By this i mean that there is sound but it is not synchronised with the onscreen events, however when the screen is resized from full screen to restore down the sound synchronisation is improved.

I have traced this back to the main page being updated with a refresh rate of 0.01s. If I change this to 0.05 the timing is greatly improved but still inconsistant.

The 0.01s is necessary to display an onscreen timer with 0.01s resolution (see prevous post "Displaying Timer Onscreen"). With a refresh rate of 0.05, when the timer counts things just don't look right. Is there any way to change the page refresh rate using a sequence? We don't need the sound when the timer is running so if possible i could change the refresh rate from say 0.1 when we need sound to 0.01 when the timer is running.

FYI, the overall function of the program is for a simulator where the user presses a button which then initiates a countdown from 3. For every second decrease of the timer a chime is sounded when at 0 they get the start sound. After this the high resolution timer then runs until the user reaches the end of the simulation, typically 10-15s. Another sound is played at the end and then the simulator waits for the next button press.

Link to comment
Share on other sites

Sounds like an interesting app, but I'm not sure why you need such a fast page refresh rate. In fact, I believe that the program will cap the refresh rate at 30hz, so anything below about 0.03 won't change the refresh rate. You can programmatically change the refresh rate using something like:

page.page_0.interval = 0.1

However, I would take a close look at why things aren't working right at slow refresh rates and see if they can be addressed in another manner. 30hz is about as fast as the human eye can detect and is typically only required for full speed video.

Link to comment
Share on other sites

I think you have anwered the question in your reply. If you look at a true timer running with a 0.01 resolution. The last digit becomes a blur and is very difficult to identify a number. This is the effect I am after. If you slow the refresh rate the eye can then distinguish individual numbers and the desired effect is lost.

We are happy with the onscreen effect when refresh is set to 0.01 so I will try implementing the page update rate in my code.

Regarding the sound, can I assume that the high refresh rate is chewing up a lot of memory (I can actually see this in task manager) hence the delay in sound?

What happens when you overlap 2 pages with different refresh rate settings? The idea being that I could have the timer sitting on the same plain background as the run screen but have the timer screen running at a refresh of 0.01 and the run screen at say 0.25. The timer screen wouldn't have any of the graphics that the run screen contains. Would this use less memory?

Link to comment
Share on other sites

Its not memory, but CPU power. Sounds run at a low priority and the screen refresh is overriding it. Overlapped pages use the refresh rate of the first page, so your idea won't work. What would help would be simplifying the page. I don't know what else you have on it, but the less the better. Reducing the color depth and resolution would help too. DAQFactory simply isn't optimized for high refresh rates.

Link to comment
Share on other sites

Thanks for all the help. I am confident that changing the page update rate in the sequences will fix the problem as we don't need sound when the timer is running.

I might also try using an analogue method of showing time with one of the built in gauge/dial components. When the simulation is finished the digital time could then come up on screen doing away with high refresh rates altogether.

Unforunately the equipment is on a boat for 6 weeks now so I won't have a chance to trial it but will try and remember to update this post when we get it sorted.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.