Hubauer Posted February 27, 2009 Share Posted February 27, 2009 I am working on a device for engine monitoring, messuring flight information,... in a microlight aircraft. As a result of reduced screenspace (8,4" TFT) a lot of different pages an a combination of component are necessary ( > 20 pages, 30 components per page). Overlay ist not possible. Therefore I have on each page 70% copies of components from the other pages. Does this influence system performance? Link to comment Share on other sites More sharing options...
AzeoTech Posted February 27, 2009 Share Posted February 27, 2009 Page components don't do anything but take up memory if they aren't being displayed. So no, it won't really influence performance at all as long as you aren't real tight on memory. Really the only component that uses a lot of memory is the symbol component and then only if you have a bitmap in it. So, just be careful if you use a lot of bitmap images. As far as CPU, you are in the clear. Only the components on the displayed page will use CPU power. In fact, because you are using a lot of smaller pages, the pages will render faster because there are less components per page. This is, however, probably pretty negligible unless you are using a slow computer. Link to comment Share on other sites More sharing options...
Hubauer Posted June 20, 2009 Author Share Posted June 20, 2009 According to the "performance question" above I tried the following sample. sample It shall run on a system with 1.5 GHz, 1 GB RAM, 2 Labjack U3HV, with WIN XP Prof. with 3-4 other applications (e.g. Nav). Testing this sample CPU usage was 100% without further applications. The system speed was dramatically reduced. Even keyboard strokes had a long delay (up to 20 s). Could you give me some hints to mistakes in design and programming of the sample. Best regards Hubert Link to comment Share on other sites More sharing options...
AzeoTech Posted June 20, 2009 Share Posted June 20, 2009 I'm not completely sure. First, you need to make OnKeyDown faster. Most of it is ok, but you probably don't want to set an analog output directly from this script because the event will be stalled while the output is being set. This can make keyboard response slow. Instead you should probably have a secondary sequence running with a low priority that changes the output based on a flag set by the OnKeyDown event. That said, I doubt that is the problem. When I load the program it works fine with no labjacks (except for the errors), so it is something triggered by the actual I/O. What I'd do is one-by-one start either slowing or stopping the I/O by changing the timing. I'd start with the really fast stuff. Do it one-by-one until things work properly. If its too painful to remove things one-by-one, remove all of them and start adding them back one-by-one until it hangs. Link to comment Share on other sites More sharing options...
Hubauer Posted June 21, 2009 Author Share Posted June 21, 2009 I followed your hints concerning "OnKeyDown" and also deleted most of the channels. The system speed is still dramatically reduced. Key strokes had a long delay still have a delay . What I find now are commands/alerts 1) "Unable to initialize Com3: Can't access port, probably in use by other app" Within some earlier experiments I created a device that read NMEA Codes via serial COM3 to DF. I erased this device and the sequences belonging to this. After clicking (DF) ---> Quick --> Delete Comm Device... or Device Configuration ... system hangs up. What might be the reason? 2) Channel Error Timing = 1.00, Offset = 0.00: C1086 One of the parameters was empty: Line 2 I guess that this has something to do with the sequence Config_Frequency, but I don't understand it. Link to comment Share on other sites More sharing options...
AzeoTech Posted June 21, 2009 Share Posted June 21, 2009 1) instead of deleting the device, set the port to 0 (instead of 3) 2) since the error includes Timing info, it means the problem is in the Event of one of the channels with Timing = 1 Link to comment Share on other sites More sharing options...
Hubauer Posted June 22, 2009 Author Share Posted June 22, 2009 to 1) the device is no longer present in the actual application, but I still have the message. How can I change the port? Or otherwise: Should I bette redesign the app from the very beginning? Link to comment Share on other sites More sharing options...
AzeoTech Posted June 22, 2009 Share Posted June 22, 2009 The port is separate from the device. You can go to Quick-Device Configurations, select Add new serial - ethernet device, then you should see the port. You can then set the port to 0. You do not need to actually create a new device. You may want to consider redoing the app from the beginning if you can't figure out what is slowing it down. Your app is not particularly complicated, so starting over may be the quickest way to figure it out. Link to comment Share on other sites More sharing options...
Hubauer Posted June 25, 2009 Author Share Posted June 25, 2009 May be you get this reply a 2nd time (soory), because I don't know if the proceeding of the last one worked: 1) The problem with Com 3 is solved, thanks a lot for your hint 2) I could reduce the root cause of the performance problem to the to 2 channels. I used the Hertz messurement sample of your manual "DF_LJ_AppGuide" section 4. See my sample app: Sample Now I get an alert message from Labjack U3 : D0050:01:0016 Labjack device #1 error: Request made on pin not properly configured for analog/digital and C1038 timing lag, data acquisition stalled. Resetting Timing 1.000, Offset 0.000 I can't see the mistake I made. Best regards Hubert Link to comment Share on other sites More sharing options...
AzeoTech Posted June 25, 2009 Share Posted June 25, 2009 There is a bug in this forum that causes certain posts, namely ones with code that isn't inside a codeblock but has a really long line, to display incorrectly to the point where we can't administer it. Anyhow, going from your last reply: You get the first error because the sequence that configures the timer runs slightly after the counter channel reads. You can ignore this error. The second error, however, is something else. So, if you run this document you see a huge performance load? As you said, there isn't much there to go wrong. The only thing I see wrong are these lines: if (Counts > 10000) Counts = 0 endif it should be: if (Counts[0] > 10000) Counts.addvalue(0) endif but that won't cause a performance problem. I'd try setting the U31_FIO7... channel to timing of 0 and restart and see if it still hangs. If not, then we know the problem is related to the channel read. Then I'd eliminate the Event script and try again. If it still hangs, then the problem is with the LabJack drivers or the device. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.