Jump to content

sydney

Members
  • Posts

    56
  • Joined

  • Last visited

Everything posted by sydney

  1. I discovered a nice little string function where the byte stream is converted to byte values which made comparing WireShark's values and what flatten to string and unflatten to string were really doing behind the scene gave me all the information that I needed to do the parsing using these flattened and unflatten functions correctly. Incidentally, I am using both tcpip and udp messages to communicate with embedded software done using WindRiver so I am not talking to any NI hardware at all, but I am providing the GUIs needed to run the remote microcontroller using these protocols to control the data acquisition and processing at the other end of the system. Thanks for the comments.
  2. I have UDP data packets based on a cluster containing 2 I32s and 5 SGL values: call this cluster type X. The data packet itself is an array of 16 elements where each element is composed of 2 I32 values, followed by 4 separate clusters of type X, and this is followed by an array of 12 elements of the type X cluster. So this total packet size is 7296 bytes. I have previously worked with data packets containing an array of 32 SGLs or DBLs and used the unflatten VI to recover the array as well as reconstruct data packets consisting of data for a simple, non-nested cluster. I tried making a template of the data that I wanted to retrieve from the data packet, but that does not seem to work at all because of the complexity of the data in the packet. Anyone have an ideas how to parse out this data?
  3. I ended up with 8 clusters, 1 for each column which made the resizing a lot easier. As for detecting the row that the event occurred in a made an event case for each control in a cluster and then searched the clusters[] property for the reference returned by the event to figure out with row (control) actually produced the event and went from there. Thanks for feedback.
  4. I once did a very similar display using Borlanc C++, but I have not yet figured out how to do this with LabVIEW2009! I need to creat a spreadsheet type of display where some of the columns will be showing text values just like a MC Listbox, but I also need to imbed one column with T/F boolean controls, and another column with digital controls so the user can enter specific U16 values given as 2n + 1 where n = 3 - 127. I would also like to detect the value change events for each cell. Normally I would put arrays or clusters of controls for each column side by side and adjust the size of each component in the vertical direction to get the desired results. In my present case I am using LabVIEW 2009 on a Linux machine so I do not have a large selection of fonts to make the text columns total height match that of the other components in other columns. If there are any ideas out there please let me know.
  5. I have code that uses strictly type def'd structrures and another programmer has some code that I want to reuse as much as possible in my project. Essentially he has parsed a file of data that ultimately will come from a database file and displayed the contents in tables. I now have a need to take this data and use it in my code where my type defs are identical to those in the parsing code. My first inclination is to unlink from one set of type defs and then to relink to the other set of type defs. That would be nice and easy, but I do not see any easy way to remake a link unless I bring the VIs into my code, and then go into the front panels and delete the clusters used for inputs and outputs and re create new clusters using my typedefs. Other than this I see no other way. If there is an easier way please let me know!
  6. I have written some GUIs on Windows and then taken the project over to a Linux machine using SUSE 11.1. There are 2 non .lvproj files, .lvlps and .aliases, that I deleted from the project directory so I could bring the whole project over to my linux machine and still use the project manager. I also noticed that fonts were a big problem! Some of them will not allow choosing sizes that I needed and found that on my machine the Courier series works the best on my 19" monitor, but I had a lot of work to do to get the display to look acceptable since I have a lot of clusters of controls and indicators and arrays of controls and indicators throughout the front panel. Putting a column of a cluster of controls next to an array of different controls was tedious as the fonts made it difficult to get the rows to match up between the various columns which were mixtures of arrays and cluster (necessary!). I also experimented with changing the 19" to 15" monitor and ran into even more than the ordinary resolution type of problems and had to redo the font sizes again. Basically, now I make the GUI on the machine that I intend it to run on and then copy the functionality code into a seperate project for each monitor and resolution which is the best that I have come up with on the Linux machines. Windows is a lot easier for chaning fonts and resolutions. Sydney
  7. According to the R. Stevens book on Network Programming the TIME_WAIT state is 2 MSL and every implementation of TCP must choose a value for MSL where the recommended value for MSL is 30 secs to 2 minutes which means TIME_WAIT is between 1 and 4 minutes. I don't know what NI is setting this to, but on our server side there is a standard socket option called SO_LINGER that allows us to set what we want which, for our application is very short (1 minute). I would like to do likewise at the server end since the 'active close' will be initiated from LabVIEW if the client has to be shut down and then restarted a short time later. This scenario would occur if a user accidentally closed the NI program and we needed to immediately reconnect to the server. This is good info that I will look into. And yes, we are using Wireshark to monitor the messages, so I am pretty sure I have to adjust the socket options and will definately look at the raw socket stuff. As for changing ports, the server code is hard coded into a custom kernel using WindRiver and the appropriate BSP for the MVME5600 board, so we really have to keep the code small and fixed on the embedded side.
  8. At this point in time I have an application that is pretty much done and meets the original project requirements; however, the requirements recently changed which is why I am posting this question. My application is designed to talk to embedded software in a VME chassis using TCPIP and UDP. I made a producer-consumer design where the consumer loop is also a FSM as well as receiving messages from a message queue. The FSM sends out TCPIP messages, while a third loop constantly checks for TCPIP receive messages (ignoring time out from the RxTCP msg vi), and these messages do come through very infrequently. The more frequent data that I have to display is received via UDP in another loop. This works well, and the block diagram is rather large, but orderly, even though I do use a lot of subVIs! My problem is that now I am required to talk to 7 separate boards in the VME chassis, each with it's own IP address! Adding code to the consumer loop to do this is not a problem, but I now have to add another loop to the block diagram to receive TCPIP messages from each board and to another set of loops for the UDP data being received. Although the code changes are straightforward, this going to take up a lot of block diagram space! What I would like to do is to open each socket on the block diagram and then put all the code that normally would be in a separate processing loop into it's own subVI, and have that subVI stop on command from the FSM/consumer loop, pass out the reference to the TCPIP close vi. I suppose that what I really want to do is to place this code into its own thread, so I may be in need of investing in RT LabVIEW, but I have not used this package. Any feedback on this would really be appreciated.
  9. I have an LV2009 application that uses TCPIP to talk to embedded code that we wrote and installed on a mvme5600 board to do some custom data acquistion and processing and have found that when my TCPIP client does an 'active close', I have to wait about 4 minutes before I can reestablish the socket once again with the same IP and port number. When the server does the 'active close' we can set the SO_LINGER' option to reduce the TIME_WAIT to something that we need as this connection is only used on a dedicated network so I am not worried about creating 'incarnations' receiving old data. Is there any way that I can change the TIME_WAIT in my LabVIEW VIs? I have thought about changing port numbers for new connections, but we really need to use the same IP and port number.
  10. I use a producer-consumer with a message queue where the producer is an event loop and the consumer loop is also an FSM. When I need to send a tcpip message, I Q the appropriate message and let the consumer send the tcpip message and then return to an 'idle' state. Another loop handles the incoming tcpip messages. In my case the incoming and outgoing messages are very infrequent so I simply use functional globals to pass sets of data around. I have been using this method to communicate with several preexisting projects that use old MVME boards in a VME chassis and the only way I can communicate it to use tcpip.
  11. I am curious as to why I get an error when I connect the error cluster through the timeout event in either the true or false case. I find it strange that only the timeout event has this problem and none of the other events have this problem! I also can wire around the case statement in the timeout event and get no wiring problem, so there is something that I do not know about the timeout event. An comments are welcome. I have another question about this code also in the timeout event: I have 4 references to 4 multicolumn listboxes feeding into the init listboxes subVI and one of these has a cast dot. When I made the subVI I included the data type on all four input references and produced strictly typed property nodes to access col hdrs[] and item names. This led to an error for the normalization-listbox reference input to the subVI which goes away when I remove the include data type property in the front panel of the subVI and do not use a strictly typed property node. The code works, but I really do not see what the problem is that requires one reference to be treated with the type cast. Even worse, I have no idea on how I can analytically approach solving this dilemma! I would love to hear any ideas on this problem. CapProbePrj.zip
  12. I have a working project that is fairly large and tried to save to version 8.5 and got a memory mananger.cpp line 547 error. I also noticed that the subVIs seem to make the version transformation even though the main vi did not. I did install the f2 patch and then got the same results. About the most esoteric features that I am using in the program are the conditional code blocks and the diagram disable blocks. Any ideas?
  13. Are you looking to learn OOPing as used in LabVIEW or are you really trying to learn how to use and program LabVIEW?
  14. I have a need to select between various data sources and show them two at a time in the chart display and would like to change the text in the plot label box to associate the name of the selected parameter with the color in the display so the user will see what parameter was selected for display. I've been looking through the properties but have not yet discovered what is needed. I know I can fudge it using text boxes, but I would prefer the cleaner property node access if it exists. Any idea which property to use?
  15. Thanks for instructions!
  16. I have a chart display that shows 3 plots of data vs time. Two of the plots have a range of 0 - 100 (mV) and the third plot has a range of 0 - 18000 (rpm). The end user does not care for a stacked display and would rather have all three plots on the same display with 3 different colors. No problem, but I wonder if it is possible to have a second y-axis displayed on the right side, which would be for rpms, and the normal one on the left side for mVs. Other than normalizing the raw data for rpm down to the 0 - 100 range and creating a pseudo y-axis and laying it over the chart display appropriately, I see no way to do this from the existing properties for this widget. Anyone know of another, easier way?
  17. Once I saw how to create the constant from the reference everything fell into place and the subVI now has one input parameter instead of the original 10 references and I now feel better about the much cleaner interface. Thanks to all for the tip(s)!
  18. I tried to bundle by name several references to clusters of controls, but find that when I drop the reference into the cluster constant box on the block diagram, the reference is not recognized by visually changing the border of the cluster box. The reference cannot be dropped into the cluster, which to me is rather strange as I look at what I am trying to do as making a struct containing pointers and seems reasonable to me. I am trying to do this since my front panel contains several clusters each containing a number of controls, and I am not trying to mix controls and indicators. If I can do this then I can pass in just one parameter to a subVI that has to work with all these clusters of controls instead of the many more parameters that I would have to pass in if I do each cluster as a separate parameter. Any suggestions?
  19. Both solutions are quite good, but yours is exactly what I needed. Thanks, and enjoy your futbol...
  20. Normally, I would have a 'confirmation popup dialog' send out a T/F and use the value in my code to determine whether or not to really do something; however, in this particular case I really need to have the event in the sub VI passed to the calling VI for processing. In other languages an event that was not processed at one level would then be handled at the next upper level and so forth until at the application level. I am trying to do something similar where the calling VI actually handles the value change event, but do not know if this is even possible. Any ideas?
  21. I have a multicolumn listbox and would like to change the behavior of the cell when user clicks on a cell from the default of the null string shown to a string such as '5600' and the user could then enter the remainder of the string. My first idea is to update the strings[] property when the cell is clicked, but what property (ies) give me the location of the mouse click event?
  22. I have been looking at the MulticolumnListBox properties to get a better feel for what I can do with this component. I can edit a cell using the Edit Position and Allow Editing Cells properties and can see the results by checking the ItemNames property. I cannot figure out what the Active Cell:Active Cell Control is used for in this component as it seems to do nothing at all. Also, no matter if Allow Editing Cells is T or F, I can still edit the cell that is indicated by the values in Edit Position since the Item names array shows the values that I am entering into the MC Listbox: I did not expect that behavior. I also have no clue as to what the Values property is or what it is used for - all I know for sure is that it is an I32 but when I created an indicator from this property I got a duplicate of the original MC Listbox component but this indicator does not reflect any editing changes done to the original MC Listbox component. I have not found documentation that explains these questions so any feedback would be greatly appreciated. Sydney
  23. What I have is a dedicated vi just for printing and is part of a large program that was originally started back in the version 5.x days of LV. By necessity the hidden controls are part of the front panel to handle input parameters and some local variables (ugh). I suspect that the hidden controls are used by the underlying printfrontpanel.vi code to form a layout of what is printed by the printer. I have also found the newer version of this VI in the reports tools, and, unfortunately, I am getting about the same results. As far as using print only visible portion of the panel choice that is not an option since the text string is so large that the print out will definately fill and 8.5" x 11" paper in normal mode! Does anyone know if the hidden controls do influence the Print Panel.vi actions as far as laying out the text sent to the printer? As I have said, both of the old and newer versions seems to share the same sort of quirky behaviour since I can only get the full text to print out if I move the text indicator at the very bottom of the screen before saving the VI before use!
  24. I am working on a program that was done in 6.x and recently have upgraded this project to version 8.5. This program has a very complex 'report' that is printed out by using Print Panel.vi from version 6.x. There is enough text in a text indicator of the VI being printed out by the Print Panel.vi to warrant not wanting to recode the formatting of this string, so I am trying to make use of what is already there, if possible. I noticed that the front panel has MANY hidden controls above the text indicator and would like to know if these controls will affect how the printer will print the complete front panel. I find that to print out the text indicator which itself would fill and 8.5 x 11 page, I have to move the text indicator as far down in the front panel display as is possible: only the top 10% of the text indicator is then visible! After a bit of frustration, I just noticed that there are literally dozens of hidden controls on the front pane and suspect that they are claiming front panel real estate so that the Print Panel.vi is acting in this strange way. I did find and check out the new version of this VI in the Reports section, but, alas, I have the same problem, so this does not seem like a version change type of glitch. Sydney
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.