Gammatech

Members
  • Content Count

    142
  • Joined

  • Last visited

Everything posted by Gammatech

  1. Hi, I have started adding languages to my document using the '@' symbol in front of words and phrases and wondered how the character set for other languages is supported. Where there are national character sets within Windows is it necessary to switch code pages? If our agent in the foreign country builds the suggested CSV file with my phrase in the first column and his translation in the second column (probably he will have his national character set active on his computer) will his translations display correctly? I am thinking of the modified characters for some of the European countries where there are various accents and tilde added to the character and then in the more extreme case the Russian character set and ultimately Chinese, Japanese or Arabic etc. Martin
  2. Gammatech

    Axis naming inconsistency

    Hi, I have just come across an inconsistency in the naming of the axis in the 2D graph component. The Righthand axis are named 1 to 6 in the component but if one tries to set the scaleto and scalefrom values from script you have to use RightAxis 7 to 11. It's no real problem once you know about it, just thought it wise to let you know! Martin
  3. Hi, We have had our application running in DF for some time without any problem but just changed to a Wide screen monitor (LG W2246 from LG L1942SE) Although Windows recognizes the new monitor DF pages are still all set up for the original monitor so that there is white space to the right of the designed page. Does this mean I have to redesign all my pages for different types of monitor format. I know DF doesn't cope with a screen resolution change but was surprised by this. Is there any work around or do I have to do a wide screen version? Martin
  4. Hi, The user guide shows how to run a CTL file automatically by making a shortcut to DAQFactory with the CTL file on the command line and I have used this without any problems. When I have tried to add DAQFactory with its CTL file to automatically start as Windows XP boots up I have had difficulties as many of the third party start up managers don't seem to like a path for the CTL file (No \ : etc allowed) can you suggest how to auto boot to DAQFactory with its CTL file. I have DAQFactory in C: as the installer places it by default with a Samples Sub Directory where my CTL document resides. Are there any likely problems? I remember some long time ago (before this forum started!) you mentioned that there could be problems running DAQFactory before Windows had fully established itself. Thanks, Martin
  5. Hi I have come across a problem building a 2D graph component entirely from script. I have four similar pages (slightly different views of the data) All four have the same 2D graph component in the same place with the same component name. Dependent on the user input via a pop up page the graph component can have a single trace two traces or three traces. The Title and sub title are set according to the selected data set and the period for display. It is the same pop up page that builds the graph but the outcome in the four instances of the graph component differ! In all 4 instances the title and subtitle are written correctly together with the Y axis title and scaling. In three instances a single trace is inserted correctly whilst on the fourth there is no trace with the component properties showing Y expression as "New Trace" When the user tries to set two traces, one instance has two traces correctly whilst two others have only one and the fourth (same one as before) just has "New trace" for the Y expression. In all four the title reflects that there are two variables. The results are similar when setting three variables. It is always the same instance that behaves in the same way so it must be something in the properties of the particular instance of the graph component but I have not been able to find it as yet. I have tried wiping the component name and renaming all four again to the same thing but this has not worked (I hardly expected it would as the script changes the titles correctly) All four have both axes frozen set to false and I explicitly set both frozen to false in the script. I had run out of ideas except to delete the 3 errant copies and replace them with a copy of the one that works and lo and behold it now all works! I am at a loss to find anything different in the properties of any of the graph components old or new. Martin
  6. Gammatech

    Problem writing to four named 2D graphs

    I originally had: Component.TrendDisplayChart.MainTrace.StrYExpression = "Smooth(Ash[TrendStart,TrendEnd],ResponseTime)" Component.TrendPrintChart.MainTrace.StrYExpression = "Smooth(Ash[TrendStart,TrendEnd],ResponseTime)" and as it was only writing to the TrendDisplayChart that was giving problems as writing to TrendPrintChart worked without fail I added your suggested page referencing just for the TrendDisplayChart, so now I have: Page.TrendDisplayOverlay.Component.TrendDisplayChart.MainTrace.StrYExpression = "Smooth(Ash[TrendStart,TrendEnd],ResponseTime)" Component.TrendPrintChart.MainTrace.StrYExpression = "Smooth(Ash[TrendStart,TrendEnd],ResponseTime)" And this seems to work as intended with the TrendDisplayChart component being able to have one, two or three traces out of a possible nine built by the user. I don't understand why the TrendDisplayChart component required referencing by page whilst the TrendPrintChart was ok but I suppose that is half the "fun" of programming! I am loathe to add page referencing to the TrendPrintChart component in case it disturbs the now satisfactory system. Do you have any timescale for the update to the graphics as I expect that will require a lot of recoding? (apart from all the efforts you guys will have to put in!) Martin
  7. Gammatech

    Problem writing to four named 2D graphs

    I am using Release 5.84 build 1636 on a vista system with the licence in a silver key. The problems show up exactly the same on a system running XP pro with the silver key and a system running XP pro but with a run time licence. I will try adding the page reference to all of the commands and report the results to this thread. Martin
  8. Gammatech

    Problem writing to four named 2D graphs

    Yet another addition: As the 2D chart that I print builds perfectly (Named TrendPrintChart) I renamed the chart on my page that is overlaid to be the same, namely TrendPrintChart. Running the build process still populates the actual 2D component that would print but STILL does not load the Y Expression on the renamed overlay chart. I then deleted the graph component on the overlay page and copied the actual component from the working print page to my now nearly empty overlay page. I corrected the position and size and ran the build sequence again with a single trace and it worked. Flushed with success I reran the build sequence for two traces and although title and other variables reflected a graph with two traces there was only one shown. The Print version of the graph remains perfect, in this case with two traces. So now I am utterly lost. Martin
  9. Gammatech

    Problem writing to four named 2D graphs

    At the same time I build the graph that is to be displayed on the overlaid screen I build an identical one that can be sent to the printer. This builds correctly with up to the three possible traces. I have even tried deleting the 2D graph component on the overlay page and then replacing it but to no avail. I can fully program one 2D component on my page TrendPrint (which occupies most of the page) but on my page that will be overlaid I cannot set the Y Expression whilst I can set everything else! (all with the same sequences) Martin
  10. Gammatech

    Problem writing to four named 2D graphs

    further: I have entered an expression manually to the TrendDisplayChart component and no matter whether I invoke Component.TrendDisplayChart.DeleteAll() from the command line or via my sequences this expression remains. The only way to remove it is to highlight it and press delete when it is replaced with 'New Trace' which, as it has a space between 'New' and 'Trace' cannot be a DAQFactory name and as such cannot be accessed by the sequence code. Martin
  11. Gammatech

    Problem writing to four named 2D graphs

    Duplication of all the code to write to the separately named graphs didn't work reliably either so I have tried your suggestion of an overlaid page with a single graph. Dependent on the particular data view that is required I set Page.StrCurrentPage = "mainpage, TrendViewOverlay" where main page is the required data view that is required. My page 'TrendViewOverlay' has a 2D graph component named as 'TrendDisplayChart' located so that it will show correctly when the two pages are displayed together. This works well. When I try to set the 2D graph component from a sequence or button action I find that I can set the Title, the Sub Title, the Axis Label, the Y scaling,Trace colour and most other requirements with the exception of the Y expression. Viewing the properties of the graph shows everything set up but just 'New Trace' under the Traces box and displayed in the Y expression window. From the command line I can Add("MainTrace") and Delete("MainTrace") or deleteAll() and although MainTrace comes and goes in the list available there is no obvious change to the properties view of the component. If after I have added the named trace I attempt to set its Y Expression no errors are shown but there is no change in the graph component either. I always DeleteAll() first so have Component.TrendDisplayChart.DeleteAll() Component.TrendDisplayChart.AddTrace("MainTrace") Component.TrendDisplayChart.LeftAxis1.StrLabel = "Gamma" I then call a sequence to set the Y Expression with Dummy = SetGammaTrendTrace(TrendStart,TrendEnd,Type) where the first two arguments are the start and end of the trend and the third signifies whether it is the MainTrace, the first overlay trace or the second. These named traces are added as above. Dependent on the period for the trace (difference between TrendStart and TrendEnd) and which of the three named traces I am trying to define the Y Expression for my code boils down to Component.TrendDisplayChart.MainTrace.StrYExpression = "Smooth(Gamma[TrendStart,TrendEnd],Smoothing)" So why doesn't the Y Expression get set up in the graph? It is not on the page that is displayed at that time, the two overlaid pages are only shown after the whole graph has been built, and the user presses a button labeled "Display". One of my earlier iterations had the graph component on a separate page that was popped up by the Display button and that generally set up correctly but not absolutely reliably so you steered me away from graphs on popups but at least this wrote the Y Expression most of the time. What am I doing wrong? Martin
  12. I have my main document that acquires data from the plant once per second on a serial line. All of the displays that the control room want are available either on the main screen or via pop ups. Other interested people want some parts of the data on their local machines so I have taken my first steps into networking. On a separate machine, connected in a peer to peer network with the main machine, I have a simplified display of the limited data set. I set up a connection called "Client1" to the named main machine and as soon as the connection was established all of the channels and sequences of the main document were visible on my "client1"connection. The data I initially wanted was all in channels on the main machine and displayed in variable value components on the client screen perfectly. One of my sequences on the main machine is set as auto run and declares and initialises all the variables. On the client machine this sequence is visible under the client1 connection and is marked as auto run but none of the named variables exist. So I now have some questions: 1) I assume I have to declare any variables I want in the local connection of the client machine. If I preface the variable from the main machine with the connection name i.e. Client1.ResponseTime will that hold the current value from the main machine? If not how can I get the value across to the client? 2) If I uncheck the broadcast box on those channels on the main machine that hold data that I don't need on the client presumably they won't then be sent out over the network each second? 3) Some of the channels that I do want need say a history of 600 (10 minutes worth) but other channels need far less probably only the latest value so is there a way to store 600 of some but far less of others? I'm thinking that as the client document will probably be minimised much of the time there seems little point in hogging any more memory than needed. Sorry if these queries seem mundane but this is my very first attempt at networking! TIA Martin
  13. Gammatech

    First steps with client display

    I put in the timeout for the condition that a stream is not present. If I loop continuously without a timeout won't the system hang? If I do need a timeout what would you recommend and how low would you suggest the delay can be? Thanks
  14. Gammatech

    First steps with client display

    In an earlier reply you said: "Typically you use GetHistory in an autostart sequence after the remote connection is established." How do I know when the remote connection is established? I look for one of the channels that comes over every second from the server computer and when it is not empty I conclude that the connection is established. Is this ok? If(IsEmpty(Client1.TPH[0])) While((Count < 30) && (IsEmpty(Client1.TPH[0]))) Delay(1) Count ++ EndWhile EndIf // Either data from stream 1 has been found or counter timed out If(!IsEmpty(Client1.TPH[0])) Client1.GetHistory("ShiftMoistFinal",0,Systime()) Client1.GetHistory("ShiftEndFinal",0,Systime()) Client1.GetHistory("ShiftCVFinal",0,Systime()) Client1.GetHistory("ShiftNumberFinal",0,Systime()) Client1.GetHistory("ShiftStartFinal",0,Systime()) Client1.GetHistory("ShiftTonnesFinal",0,Systime()) EndIf I wait for up to 30 seconds for some data to come in and thus show the connection is established. When the While loop terminates there is either a valid connection or 30 seconds has elapsed. If there is a connection then I get the historical data that I want. How long should I wait for a connection to establish? 30 seconds is a long while if I'm going to check a number of possible streams. Can you suggest a better way of proving the connection and then getting the historical data across? TIA Martin
  15. Gammatech

    Using Language option

    Hi, Any suggestions for getting the System.MessageBox to display in the set language? I have tried System.MessageBox("@Select Language") and setting a private string SystemMessage = "@Select Language" and then calling system.MessageBox(SystemMessage) and duplicating the leading '@' in both methods but this simply displays the leading '@' Martin '
  16. Gammatech

    Using Language option

    Hello, I seem to have developed a problem with the language switching. I have the two arrays of day names and month names as you suggested ( I called them dNames and mNames respectively) At initialization they are populated as dNames = {"@Sun","@Mon","@Tue","@Wed","@Thu","@Fri","@Sat"} and mNames = {"","@Jan","@Feb","@Mar","@Apr","@May","@Jun","@Jul","@Aug","@Sep","@Oct","@Nov","@Dec"} When the user wants to change the language he invokes a pop up page that has a combo box, populated by the menu system used, with the languages available. The Menu system clears the combo box, loads the first element with "@Select", the second element with "@English" and the successive elements with the contents of a list of the languages obtained from System.GetLanguageList(). Pressing a button beside the combo box captioned '@Confirm' has as its first action 'Submit' followed with a second action (As long as there is a valid choice made) which is a Quick Sequence that first resets the two above arrays and then sets System.Language = Choice Made from the combo box. All of the text on the screen changes to the new language with the exception of the week and month names even though they have theoretically been reset to the English (default) with the leading '@' Watching the two arrays shows no change and each element has no leading '@' If I press the button a second time with the same language selected THEN the month and day change as they should. I just don't understand why the same quick sequence changes things a second time but not the first. Watching the arrays as the second press shows that the arrays change as they should except that there is no leading '@' I even tried the rather ludicrous looping around the resetting of the two arrays while one of them had not been reset! Even with this it still needs two presses of the button to reset the day names and month names as displayed and watched. Duplicating the leading '@' displays the '@' on the screen. Can you shed any light on what is wrong? Martin
  17. Gammatech

    Using Language option

    Hi, On the Descriptive Text Component it seems difficult to align as the language changes unless I pad out the translation with leading spaces to ensure that the colon that I have added lines up vertically with the captions of the variable value components below it. There doesn't seem to be an alignment specifier so what value should I set in the Align Field of the Style group of the Properties for this component. Martin
  18. Gammatech

    Using Language option

    Sorry, I don't understand. Do you mean I can't use the DateTime edit box?
  19. Gammatech

    Using Language option

    Another Query. On the DateTime Edit Box how does the Date Format have to be set up? prior to the change to using the language option I had: "ddd d MMM ',' yyyy" to give me for instance "Thu 17 Mar , 2011" Now when a particular language is invoked I would want the format the same but the abbreviated day of the week taken from my array of week day names and similarly the month from the array of month names. I tried a number of combinations of the array names but this produced the interesting: 23 23Na 5e22 5Na 5e22 , 2011 So have you any suggestions for this O wise one? TIA Martin
  20. Gammatech

    Problem writing to four named 2D graphs

    Right, I renamed the other three 2D graph components and Quadrupled the parts of code that were addressing the original component to reflect that there were now 4 different components and much as before the results are inconsistent. All four components always have the titles and subtitles changed correctly but one, (the original that all others were copied from) works correctly, two have the Yexpression set only to "New Trace" and the fourth has three "New Trace" entries as well as the one that should be there. Your second suggestion was to use overlaid pages. The graph I want to show is always in exactly the same position in the lower left quarter of the screen on each of the four pages and I use that same area to pop up any pages for user interaction. So can you explain in a bit more detail how I can arrange overlays? I used to draw the graph on a pop up page but that occasionally caused DF to hang so I moved to the current system. I assume if I overlay pages I have to make the bottom left quarter in some way "transparent" so that the graph underneath can still be seen? I do not know how to do this. Martin
  21. Gammatech

    Using Language option

    Thanks, that now seems to work ok.
  22. Gammatech

    Using Language option

    Hi, I have found a crude fix in that the action to apply whichever language is selected sets the WeekDayNames array to have the correct content without any leading '@' so I am not using the language option for these direct replacements from the look up table. It has the disadvantage that if another language is added via the Tools>Languages>Add route I would also have to add the appropriate Case statement and array of words so it is rather dirty in comparison to your smooth method for normal language transition but I suppose I'll have to live with it unless you can point to a better way. I need to be able to switch back to English in case one of our Engineers goes out to the foreign country to do some work on the system and then he can reset it to the local language when he leaves. Martin
  23. Gammatech

    Using Language option

    Hi again, My array of weekday names was initialized to {"@Sun","@Mon","@Tue",etc} and in the language list I added the translations for these 7 words. After selecting the language the contents of the array show in the watch window as {"Ned","Pon","Uto",etc} which is as they should accept that the leading '@' has been stripped. When I reselect English as the language, by setting to one that does not exist, various words that I have translations for change back to English but the content of the week day names does not so that in those places where I am displaying an element from the array this stays in the foreign language. Does this point to needing a double '@' before my word? or am I doing something else wrong. As the array has actually changed its contents I can't see how there is any way I can change back to the default language. I would have expected my array to always have the default week day names with the leading '@' character to trigger the change over if the language is NOT English when one of these words in the Array are used. Martin
  24. Gammatech

    Using Language option

    Yes, formatDateTime("%m",systime()) returns 01,02,03,...11,12,01 as the months go by, whereas the formatDateTime("%w",systime()) returns 0,1,2,...5,6,0 as the days go by. To get round this I have inserted an empty element "" before "@Jan" in my array. Thinking about it, it is obvious as the function is supposed to return the month number which is always indexed from one for January whereas the days of the week have no hard and fast indexing (which often causes problems). In this case Sunday is zero. Martin
  25. Gammatech

    Using Language option

    I made the arrays as you suggest except I made them string type as surely they should be. WeekDayNames[formatDateTime("%w",systime())] gives the correct element out of the array but has dropped the leading '@' symbol so presumably I will have to duplicate this in my string array? The Month translation seems to be indexed strangely so that monthNames[formatDateTime("%m",systime())] gives one month in advance of the current month ie Apr rather than Mar for today's date (17th March) without the leading '@'. FormatDateTime("%m",Systime()) returns 03 in the Watch window so is this returning a string? FormatDateTime("%w",SysTime()) returns 4 as expected for Thursday. Martin