Jump to content

ShaunR

Members
  • Posts

    4,942
  • Joined

  • Days Won

    308

Everything posted by ShaunR

  1. Back on topic Just downloaded and installed 2009.F2. Doesn't work .....bugger
  2. Virgin In? Virtually Incapable of? Very Inconsistent? Bet you wish you hadn't asked now...lol
  3. You can also pull the network plug out while your running tests
  4. Ooooh. I didn't realise this. I knew windows event queues can be swamped with messages if there is no sink and if you can get enough in before the message managerr times them out. I assumed (obviously wrongly) that it worked in a similar fashion Thinking about this. If you are going to supply an event refnum from the caller (I prefer encapsulated but what the hell), the Xcontrol can bundle its events onto it. Then when you wire the resultant event cluster through a register to an Event case, you can choose not only the calling vis events, but the Xcontrols as well. It would give the Xcontrol tight integration to the callers events and a fairly close approximation to how real other event driven langueages operate.
  5. If you notice. After the initial flurry, reputations are increasing at a massively slower rate. I put this down to the fact that people (like me) didn't know what that little green number meant and kept clicking on it to see what happened. It took me ages to figure out that it was for the reputation system and not in fact, to add the post to a multiple reply I also think its a bit misleading, since those that help newbies are unlikely to get better reputations since a newbie generally doesn't realise a) they can vote, or b) what it is for. However, those in the "old boys network" will get tremendous reputations.
  6. Cool. Glad its working Looks like you've been through the string pallet and now know every function . (You can replace everything up to the "Array to Cluster" with a "Spreadsheet String To Array")
  7. Nope. If you do that, his project will succeed and he will get the credit. He might even get a promotion since, after all, he may not be technically bright, but he sure can manage YOU! He'll end up as your manager Let his project struggle then when the boss is in dispair offer advice to the boss on how to bring it back on course. Then the boss will probably GIVE you the project. Your labmate will have demonstrated his incompetence, you will have shown your helpfullness and he will end up working for you
  8. If you use a DataGrid .Net control. It has a GdiVertical font attribute you can use.
  9. Vociferously Incoherent? Vehemently Intractable? Veritably Incredulous? Vaguely Interesting? 6?
  10. Interesting. I view it the other way in that since it is a broadcast mechanism it doesn't matter where you create it as it is the reposibility of the receiver to register for it. I would consider A more in line with event implementations not only in LV but in other languages too (for example in Delphi, control events are only available once you place that control on the FP). In B, what if you create an event that doesn't exist in the XControl? B also requires external initialisers where as A is self contained and the events are available just by placing the control. However, in the case of A I think you need a backup plan for if you generate events and there are no registered recipients since you will just fill up the message queue.
  11. Whay do you think the "I" stands for in VI Engineering:P
  12. So does it work better now?
  13. Only if set to clone! Oh. And if Labview decided to do a context switch because its run out of threads in that execution system The downside is all the dataspace allocated for each clone. You've bought it? No printer then ...lol.
  14. Not at all. Marking a vi as re-entrant means that a full copy of the "executing" code is instantiated in the calling process. This is for both types of re-entrant vi ("clone" and "same copy"). Since copies of the code exisit in the calling processes address space they can be run in parallel. The difference between "clone" and "same copy" is the datapsace. A re-entrant vi marked a "clone" has its own dataspace for every instance you lay down in a diagram. If marked as "same" then all the instancies have only 1 dataspace shared between them. In the case of a LV2 global. If you mark it as "clone" then if you call it from one location it will not contain the same data as if you call it from another, therefore it will only function as required when marked as "Same". However, in doing this you may cross execution system (ES) boundaries if the calling vis are in separate ones (if it is set to "same as caller") or you give it its own ES. And crossing an ES WILL cause a context switch. By the way, this is all a bit moot if it doesn't resolve you problem
  15. Have a read of this.... http://books.google....itching&f=false In particular 9.2.3 and (replace the word "Process" with "Execution System") and ask me again.
  16. Its not so much waiting for it to become available, it more to do with the CPU having to save state information between switching from the global in one context or another. Have a Google for "context switch" its a big subject. But suffice to say, the least, the better. With what I have described above, you will never lose data. But the downside of that is that if vi B is producing faster than you are consuming then your queues will grow until you run out of memory. If this is a possibility (and undesirable) then all you need to do is "pause" vi B populating one or both of the queues when the queues are full (fixed length queues) and resume when A or B have caught up. Or (as you rightly say) use a lossy queue. The choice is really if you require sequential losses or random losses. But he above will enable you to easily change how you manage your processes with minimum effort and run most effeciently.
  17. What execution system is the LV2 global assigned to (same as caller???). There's probably a lot of context switching going on since you cannot encapsulate the global in a single execution system. You basically have a one to many architecture and I would partition it slightly different to take advantage of the execution systems. VI A dynamically launches VI's B and C. VI B runs in a continuous loop and manages a DMA from a 3rd-party DSP board. It puts ALL of the data into Named Queue 1 and Named Queue 2. VI C runs in a continuous loop, flushes Named Queue 1, Extracts the bits it needs, then and transmits the contents via TCP/IP on physical port 2. VI A reads the data from Named Queue 2,Extracts the bits it needs, processes it, then flushes Named Queue 2 and transmits the contents via TCP/IP on physical port 1. VI B would run in (say) "Data Aquisition" at "High" Priority. VI C would run in (say) "Other 1" at "Above Normal" priority. VI A would run in (say) "Other 2" at" Normal" Priority. This way you can give your vis hierarchical priorities to determine their reposivenes under loading. You could also get vi B to extract the bits and only put what is required for A and C on the queues (therefore simplifying A and C and reducing memory requirements at the expense of speed) if it has a light loading (if you want). The way described just makes vi B simple and very fast and context switching won't be an issue.
  18. I my bluetooth stuff somewhere on this site, I address multiple transport layers. It'd be worth taking a look to see how its implemented but basically it makes the interface (TCPIP, UDP, IRDA, Buetooth in the example) transparent to the protocol. Might be a way forward for you to simplify your low level stuff.
  19. Are you describing a single device on multiple interfaces an protocols (e.g a dvm that has gpib eternet and rs232 interfaces that you want to test) or is it multiple devices on multiple interfaces such as motors on rs485, dvms on gpib and digitalio on ethernet that are used in conjunction?
  20. Mot much in it really. Labview nowadays creates copies of things if there is a Y in the day and you've just exhaled. The main advantage of data over refs is that data is much easier to debug since you can probe it directly to see the data.
  21. didn't see this thread. Why did you start a new one? I wasn't refering to static VI refs. Indeed. Constants are, well, constant Immutable, unchangeable! If you can change it is not a constant, its a variable. Indeed. Constants are very often used for type information especially with polymorphic vis. I looked at your "confusion" image and it seemed to me to be syntactically identical to: So I didn't think it unusual or erroneous since I use something similar with self initialising functional globals.
  22. Woohooo. Next question. When can I download 2009.1.....tomorrow?
  23. Thats because the number of format specifiers have to be exactly the same as the fields you are trying to extract. From your last example, the last digit is 1. If you are viewing the value in a digital indicator and "hide trailing 0" is set, you will only see the decimal places IF the digits are non-zero. If thats not the reason and you want that to be 1.00 I would suggest using %.2f as the format specifier.
  24. Well. There are a few ways. If the message string is always in a fixed order and fixed length and messages are not concatenated, you can use the "Scan From String" which will give you the results straight away in the format you require. If its not, then you can use the "Spreadsheet String To Array" to break up the string at the delimiters then convert to whatever formats you like.
  25. When you use the port write, the number you wire represents the bit pattern of individual DOs. So "1" would turn on DO 0 and turn off all others, "2" Turns on DO 1 (all others off) and "3" turns on DO 0 AND 1 etc since 3 (in binary) is 00000011.
×
×
  • Create New...

Important Information

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