Jump to content

jpdrolet

Members
  • Posts

    367
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by jpdrolet

  1. Paulo, for each client connection I run an instance of a reentrant VI that handles that connection. These connection handlers run in parallel so when a new message line has to be sent, the "TCP Write" functions all write in parallel for each connection. A slow connection won't slow down other connections like it would happen if you write to all connections in sequence in a for loop. For the moment, when a new message line is received on one client connection, it is sent to a notification. Other connection handlers wait for this notification and send the message over their own connection. This notifier scheme is not robust enough since messages are lost/overwritten when many messages are notified rapidly, faster than they can be sent over client connection. I'll have to use some queued scheme. Jean-Pierre
  2. Hi I was bored tonight so I decided to wire this small Chat Room Client/Server Application. I named it BabVIEW (how silly and not original, I know...). Users that run the attached client and connect to the server running on my PC will be able to chat live. Well they are supposed to... I didn't test it with multiple clients over the Internet. Who will have the honor to be the first to connect? I might post the server code if all goes as expected. Download File:post-447-1096436681.vi
  3. With LabVIEW, I have port programmed a CIO-DAS8 (ISA) and it is quite straightforward (set channel register, start acquisition, poll data ready, read data registers) for single point basic acquisition. Is the 1600 very different from the DAS8? To use timers and interrupts for timed multichannel acquisition, I think you'll need the low level drivers.
  4. While moving an object with grid on, hit "g" to toggle the grid. On a related note, use "a" to toggle wire autorouting on the diagram.
  5. You blew your City Hall for a bloody movie? Gee you really wanted that Hollywood money! I see many of us use Mozilla Firefox. :thumbup: here is the last wallpaper I used:
  6. Here is mine. I still need LV4.1 to support an application. I don't use LV5.1 anymore. LV6 is phasing out. LV7 is my current workhorse. LV7.1 is still on the CD... I don't put a full wallpaper. It slows the screen refresh too much...
  7. What I wanted to emphasize with the previous diagram is that the whole array is not accessed by the calling diagram. It is encapsulated in the LV2 Global. A better illustration is like: where only a little part of the array is read/modified/written. Of course you are right Michael, if the operation "increment subset" is used frequently, then it makes sense and it is more efficient to include it as a function of the LV2 Global (attached). This implementation can still cause race conditions. To avoid that, either put all possible operations on the array in cases of the LV2 Global or provide a lock mechanism to prevent simultaneous read/modify/write (like in GOOP). Download File:post-447-1095907186.vi
  8. With a huge array held in a LV2 global, there is no advantage of ouputting the whole array to modify it because a copy is being made. Avoid to put the array on any indicator. Look at the attached picture. No copy of the whole array is made, only the elements needed to be modified are replaced. The idea is to include in the LV2 Global a lot of functions to manipulate the array in place without having to access/copy the whole array on calling diagrams.
  9. Bravo! But which sense!!! :laugh:
  10. Look closely, there is nothing hidden. Check for data sources and wire directions. I found the trick with the lightbulb, I was sure LabVIEW would choke trying to run that.... Since the VI was converted from LV4, I thought there was some error, but it's legit code.
  11. I've found this remarkable counter intuitive piece of code today... What's wrong with it :question: Thanks for the lightbulb mode
  12. I forgot about this "Expose Typedef" thing... Yes Philippe, that is the way to extract the typedef from variant data. While Variant To Flattened String does strip the typedef info, it can still be retrieved by flatteneing the variant itself and getting the subtypedef in the flat data string of the variant. However, I'd like to know if there is any use that can be made of this typedef info, basically the name of the typedef control VI... I'll need to analyze the type descriptor with typedef info to figure its structure and figure how to detect when it is present or not. For example of possible usage, when receiving variant data with typdef info, one could extract the control name, open a VI reference. get the directory where it is located and find there Method VIs to operate on the data.
  13. Yes but as commented in Remove Typdef From Variant there was a bug in LabVIEW 6.1 such that Variant to Flattened String did return an invalid type descriptor when used with typedefs. The VI was introduced as a workaround. Typedef information in type descriptors was introduced in LabVIEW 6.1 and this bug was a big disapointment since it did make LabVIEW Data Tools useless on typedef variant. I did not dig in documentation recently but I think that this typedef information is not yet documented for type descriptors (LV7 is shipped with the same old Application note 154). LabVIEW Data Tools have never been implemented to use that typedef information in variants. The returned type descriptor was invalid anyway. Now that you have made me look more closely, it seems that the typedef feature was removed in LV7 (type descriptors from Flatten to String and Variant to Flattened String don't include typedef information anymore...). That makes me wonder if that was a feature in LV6.1 or a simply a plain bug. It is from LV6.1 that typdefs are displayed in variants, wire help and that typedef conversion is indicated with a coercion dot. Internally this information is carried in data type and maybe it was just a bug in LV6.1 that made it leaked in type descriptors.... Jean-Pierre
  14. For the specific use of casting control refnums, the function "To More Specific Class" is more appropriate here, providing an error when the typecasting is not appropiate for the control class e.g. typecasting a generic control refum (string) to a specific control refnum (numeric).
  15. If the event name is not known at edit time, how could you create an event case for it, and put code to handle this unknown event :question:
  16. To change the dataname of a wire, use the function Typecast or Variant to Data. On the type input, wire an appropriately named control or constant.
  17. I've noticed that long ago. Open VI Reference is blocked by modal windows maybe because it runs in the UI thread. I think you can add a modal VI to that list. It is very annoying. The only workaround I see is to create these VIs in a separate instance of LabVIEW/Run-Time App. Or maybe having one application space reseved exclusively for user interface while another does the background stuff. * surfs searchview.net * Hum. THAT long ago? http://messages.info-labview.org/2000/03/10/28.html
  18. I don't know if it is a bug or an intended change, but the path setting "Library Directory" is ignored in LV7 built apps. In LV6, we could set it to the LabVIEW directory and launch unbuilt VIs (with launcher built app) and VIs from vi.lib and user.lib were found where expected. This doesn't work anymore in LV7. The library directory seems to default to the application directory. We must set vi.lib and user.lib in the search path for the application to find them. However, the load time is much longer then. Workarounds are to put the launcher built app in the LabVIEW directory or copy library VIs in the application directory.
  19. I mean to customize a single control so it includes the decoration. Then the decoration will follow when the control is moved. See attachment Download File:post-447-1092956037.vi
  20. Customize one of the controls to include the decoration within. The decoraratin will move with the control.
  21. Application settings are stored in the file. For example, if the VI Server and Web Server are enabled in your application, access list and exported/visible VIs list are stored there. You can distribute this this configuration file with preset settings for servers and default fonts etc.
  22. Maybe the Application name in the builder settings doesn't have the .exe extension :question:
  23. You can't index a cluster in a loop. You have to transform it into an array. If the 9 subclusters are of the same type, use the function Cluster to Array. It will output an array of 9 clusters of 3 elements.
  24. In a recent Info-LabVIEW thread there was a need for HTML display. I have wired this SimpleFormatter.vi that accepts tagged (markup text) and display it in a string. With a syntax parser that will wrap keywords with property tags, it can be used for syntax highlight. It still require some work (to handle the character "<") and has merely been tested with the provided example. The font property also needs to be implemented. Correct syntax is assumed. I defer panel updates when formatting the string but the string indicator is still drawn twice. Download File:post-447-1091080666.vi Download File:post-447-1091080685.vi
×
×
  • Create New...

Important Information

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