• Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About EOlsen

  • Rank
    Advanced Member
  1. I concur with this line of thinking not only for AB controllers, but for most types of interfacing equipment. It would be much better to be able to read inputs of any kind in blocks as opposed to one at a time especially for any equipment on a serial link like RS422. But would also be beneficially for Ethernet connected equipment. For some our controls we are turning several pieces of equipment on and off at the same time as the process changes modes. So if possible it would also be nice to have block writes were applicable. For now we are solving this problem by doing all I/O through variables created with OOP and writing our own drivers, but this isn't the ideal solution. This has proven to be quite a bit of extra work. If enhancements are made to the I/O system, I would like to see the ability to have persistent variables for calibration factors and set points as well.
  2. EOlsen

    Table Component

    Is it possible to display two dimensional array data in a table? For example, suppose you read a bunch of lines of data from an ascii log file, and while reading the file you parse each line to separate the data into individual fields and append this parsed array to a global data array. The code would be something like global string data private string fields private string instr = File.Read(h, 0) while (instr != "") fields = Parse(instr, -1, ",") data.Append(fields) instr = File.Read(h, 0) endwhile Now you want to display the data array in a table. What would the expression have to be for each column in the table in order to display field[0] in the first column, field[1] in the second column, etc. of the data as it was parsed? Tried expressions like data[][0], data[][1], etc. but haven't found the right expressions.
  3. EOlsen

    Report Creation

    Yes, using inches puts the table in the PDF. But there is a problem if the contents of the last cell exceed the width of the cell, part of the contents is displayed past the right edge of the table, part is masked by the vertical scroll bar, and part appears to wrap around and overlay the beginning of the cell. Also the PDF only includes what is showing on the display and not the entire table. Could temporarily resize the table, but what happens if the table is really long - say 500 hundred or more rows. Are there limits to how big you can make the vertical dimensions of the table without running into problems? And in this case what would you want to use as size parameters for the printPDF function?
  4. Yes, thank you. That worked. For anyone else interested in displaying system errors (alerts) in a table with human readable dates and times. Create a table with 2 columns. In the first column enter FormatDateTime('%Y-%m-%d %H:%M:%S', GetTime(strAlert)) as the expression. In the second column enter strAlert as the expression.
  5. EOlsen

    Report Creation

    Is the Page.PrintPDF() function still supposed to be working with pages with tables? I have a page with a table as the only component. When I use the function it generates a file, but when viewing the PDF file the page is blank. I calling it from the command / alert window as Page.PrintPDF("Table", "Test-1.PDF", 1000, 1000). Any suggestions?
  6. As I understand it the system variable strAlert is an array with times associated with each error or alert entry. I would like to create a table to display the contents of the strAlert array with associated times. Getting the text to display was easy, just assign strAlert to the column, but I haven't figured out how to display the associated times. Using strAlert.Time doesn't work. Is there a way to display the times associated with strAlert in a table?
  7. I've been using a lot of ? commands to see what is going on especially when an error occurs. In part I'm doing this because the system generated error messages are often don't provide as much information as I'd like to see like the name of the file that failed to open. Soon will move the system to a live installation, and would like to know about errors that are still occurring. Is there an easy way to redirect the output of all those "?" commands to a file?
  8. I was assuming GetFileNameList() would return file names with extensions while GetFileTitleList() would return the names only without extensions, but both of them return a list of file names with extensions. Is there supposed to be a difference? If so, what is it?
  9. EOlsen

    Tree List In A Popup Window

    Yes, it is working when I call it from another sequence. Any chance of being able to change the font size of tree lists? The default font size is smaller than I would like for this use, and I'm guessing other DAQFactory users might appreciate being able to change the tree list font size like we can with other components.
  10. EOlsen

    Tree List In A Popup Window

    What I was trying to create was a function like system.entrydialog() but for making a selection from a list of options. And I wanted to use it within another function to assign a value to a local (private) variable. This user selection would determine what logic path the function followed before returning a value to the function that called it. So having a separate end popup function isn't going to make that possible. The function calling the popup will have exited and the local variable will no longer exist. The correct logic path won't get followed and the function calling the popup will return an incorrect value to the function that called it. My thinking was it wouldn't hurt system performance because the I/O and control logic would continue to run in the background on their own threads while the user interface thread was waiting for user input. Sounds like you are saying I can't get there from here? I still curious why what I tried to do did not work. In my code why was the while loop keeping the popup from popping up?
  11. I wanted to create a function that would return an item from a modal popup window. The initial problem was once Page.MyPage.PopUpModal() the rest of the calling function continues to execute. My solution was to have the TreeList script set a global variable and then close the window. The calling function would watch for the global variable to be set and then return its value. But this approach is hanging DAQFactory. I'm using a modal window because I want the user to make a selection from the popup window before moving on and doing something else. The problem seems to be with the while loop waiting for the global variable to be set. If I comment out the while loop, the popup opens up and the global variable gets set as desired. But before all that has taken place the calling function has completed with the global variable still empty. So clearly I'm doing something wrong. What's the right way to go about this? Attached is my testing ctl file. Select-1.ctl
  12. I have a variable I'm using to store a color value. It gets set to NaN at one point in my code which isn't a problem. The problem is I want to check to see if it is set to NaN and if so change it to some other value. The variable isn't empty. So IsEmpty(myvar) returns 0. Trying to compare myvar == NaN() generates a C1066 Invalid operator error. global myvar = NaN() ? myvar // Shows NaN if (myvar == NaN()) // Generates error code How can I check to see if the variable is equal to NaN and then change it to something else?
  13. I was attempting to use the Min() function to adjust the size of a variable and it throws an error. What needs to be changed to correct the following: global w = 56 w = Min({w, 33}) // This line generates C1072 Invalid {} pairing error And of course get the same error using Max() instead of Min().
  14. EOlsen

    Table Component

    Thanks for the update. Very nice. Just one question. Isn't LeftCol always going to be 0 since the table doesn't scroll horizontally? How would display the table where LeftCol wasn't 0?
  15. The default tree list font seems pretty small on my screen. It is readable, but smaller than I would like. Most of the other components allow changing the font, size, and color. It would be nice to be able to do this for the tree list. Font size is the most important.