-
Posts
393 -
Joined
-
Last visited
-
Days Won
32
Content Type
Profiles
Forums
Downloads
Gallery
Posts posted by vugie
-
-
No need to use IMAQ - Get Image Subset from Graphics&Sound -> Picture Function palette does this. If by "Picture" you mean Picture Control, you have to use Picture to Pixmap first.
-
I was actually hoping to avoid using the Volume Serial Number, since I understand that it is not very static (reformatting will change it, and make the license obsolete). I was leaning more towards a physical Serial Number of the hard drive which can only be changed if the hard drive is swapped. MAC Address is no good since disabling the network card will make it impossible to read, and internet is not necessary to run the program.
Michael's link fruited some ideas about using the BIOS card, which I'm looking into now. Any ideas about this?
As for volume physical serial number you may use Win32_PhysicalMedia class from Windows Management Instrumentation, but you would have to build your own DLL wrapper in C++ or use MS script engine to get this information (examples for both methods for WMI are provided in above link). Additionally WMI gives you classes (I may be wrong - just found this out) to get virtually any number from hardware (i.e. motherboard serial). But it seems to be little bit tricky to use and works only for XP and above.
Alternatively you may use diskid32 freeware tool in manner similar to "dir nothing".
Using MAC address for licensing is a joke as changing it is very simple even for not advanced user. IMO optimal way is to use combination of few hardware related serials and obsoleting license only when ALL of them change.
-
You don't need to create anything - that's why Mike's example returned "File Not Found".
It's 1.30 AM - I would better go sleep...
[edit]
but string parser should be OS language independent
-
In did this a long time ago like this (only for windows).
Make a system call to "Dir nothing.txt" this will give you this result:
H:\>dir nothing.txt Volume in drive H is Data Volume Serial Number is [color="#ff0000"]64BA-5E87[/color] Directory of H:\File Not FoundH:\>
Then just parse the string
//Mikael
This method may be simply hooked by creating read-only file nothing.txt where you can put whatever you want. Of course one has to figure out first what and where to create... Anyway, much safer method is GetVolumeInformation function from kernel32.dll (to be used with Call Library Function Node).
-
This is not required as:
(from documentation)Terminals[] PropertyProperty of Wire.
References to the terminals connected by this wire. The first one is always the source, if one exists.
But I guess that gb119 would be more interested in this:
Joints[] Property
Property of Wire.
Returns an array of all joints (intersections, bends and end points) of the wire.
The output of this property is an array of clusters, where each cluster represents one joint of the wire. The cluster can be interpreted as follows:
The Position is the X,Y position on the block diagram of this joint.
The Type indicates whether this joint is a bend in the wire, a fork of the wire, a connection to a terminal or a loose end of the wire.
Up/Down/Left/Right are indexes into the array for the joints that are next along the wire in the respective direction from the current joint.
The Flags are defined as follows:
0x1 Joint is connected to one of the terminals of the signal.
0x2 Used for optimizing redraw of signals. Do not modify.
0x4 Used for optimizing redraw of signals. Do not modify.
0x8 Joint is currently selected on the block diagram. If any edge connected to the joint (up, down, left or right) is selected, this bit will be set.
0x10 Right edge is selected
0x20 Down edge is selected
0x40 Used for optimizing routing. Do not modify.
0x80 Used for optimizing routing. Do not modify.
0x100 Joint is loose (meaning it is not anywhere along a path between two joints that are both connected to terminals). Do not modify.
0x200 Joint is on path (opposite of "loose"). Used during path and split algorithms. Do not modify.
0x400 Unused
0x800 Unused
0x1000 During the most recent edit operation, this joint was shifted horizontally (cleared when wire table is rebuilt at the end of every edit operation)
0x2000 During the most recent edit operation, this joint was shifted vertically (cleared when wire table is rebuilt at the end of every edit operation)
- 1
-
Terminal has a property Connected wire . You take a wire and get its Terminals[]. The first terminal in this array is always a source terminal (terminals has also Is source? property) - let's call it STerm. Now you have to go through all GObjects on the same diagram. You have four cases here: GObject is either Control, Constant, Node or FlatSequence. Two former have single Terminal property (according to AQ you can typecast Constant to Control making it one case), two latter have Terminals[] property. So for each GObject of these types you have to go through all its terminals (one or more) comparing their references to STerm. It may appear that node you found is a loop or other structure. In this case if you like to search further for the source you have to specify class of terminal reference to OuterTerminal, take Tunnel property, then its Inside Terminals[] property and recursively go further.
In simple form I'm doing something similar here in Generate Objects and Links.vi
-
Any way to downgrade it to 8.2?
-
- Popular Post
- Popular Post
Newton's Cradle anybody?
No problem. [watch] (few other simulations included in this movie)
It grew up into quite serious real time dynamics simulator with Euler integration scheme, non-linear spring equations, collision engine, independent display and calculation rates...
Few details for those wanting to play little bit (performance is much better than in previous version):
- Only Nodes and Terminals may be movable (in terms of LV class hierarchy) - so no constants and no flat sequences
- Masses are proportional to object size and scaled with "Mass ratio" parameter - do not set it to 0
- "force factor" scales wires elasticity
- Damping is applied to wires only (not to bouncing). Very high damping will make wires almost stiff
- Gravity is in pixels/s^2. y axis points down
- dt is integration step size in seconds. Fractions of seconds make sense. Smaller is (almost) always better - particularly for collisions
- fps is display only frame rate
Have fun
- 3
-
Unlimited by-ref has come. And that's the problem. :-) His program was not a case of LV having a bug, but rather he just coded something where Diagram Alpha was using a reference and Diagram Beta tried to acquire that reference, and was waiting, and, meanwhile, Alpha was waiting on Beta before Alpha would release the reference. And his program sat and waited on itself.
...and then it suddenly stood up and said: "I'm not waiting for this bloody reference, I'm going back to 8.6"
-
I like this inertia thing... SubVIs could hang by their wires, giving them a larger bend if the subVIs have more mass (VI Metrics).
Also elasticity of the wires may be dependent on their thickness. Or amount of data they carry
I just realized that word "wired" is not the same as "weird", which I really meant...
-
No matter how good you are at ASCII art, I bet you can't do that in visual studio.
Ages ago in DOS ancient timesthere was a virus called "falling letters":
-
- Popular Post
- Popular Post
It's just tu pun together some pics from this topic and little bit more...
So we already saw that wires may go diagonally:
Then that they may have almost any shape:
Michael showed us how execution dots propagates on such wires:
Sources for creating such wires here.
Now I'm getting crazy.
Sit down, fasten your seat belts, hold your breatch and watch this.
Although it does not run too fast (no more than 10 fps on my computer) but Jing slowed it down even more, so in real everything happens much more smoothly.
If you would like to play with this: controls or nodes which have labels are fixed to backgroung. Don't change damping too much. Don't put too much objects on BD. Always wire both inner and outer terminals in tunels.
Sources attached.
- 5
-
If you would use the right click it would come out with a solution which unwraps the wires so that a crossing only looks like a crossing but is in fact just two touching wires as indicated.
Done:
However cross calculation algorithm slowed it down quite much. And highlight execution drops "bounce" on crossings...
- 2
-
Your dreams are too broad.
Same, as I guess, applies to templates? Functions overloading?
-
One serious limitation is that the wire cannot cross with itself - so cycloides chenged to chain of arcs.
BTW, I found strange issue with property Joints[] of the Wire class. It describes actual wire bending and is marked as read-only in docs. There are some flags and few of them are marked "do not modify" (?!). I would like to be able to modify some read-only properties... But for property node option "Change to write" is not greyed-out, however modyfing writing to this property results with "Property doesn't exist". Quite strange, isn't it? LV82
-
- Popular Post
- Popular Post
That was only the start...
Attached what it was created with.
No description, no comments, no even icons - I warned you.
- 9
-
how about a plugin to round the corners of wire bends?
I also had that idea. It's quite fun - I'm still playing with it and all that brought me to idea for coding chellenge:
"The most wired thing you can do with wires"
-
- Popular Post
- Popular Post
-
Since ages I am missing the context menu entry "Finish this VI". It should simply finish programming the code for the selected VI according to my ideas and the requirements. Does anyone has such a function?. Any idea how to make it?
That definitely should be the part of RCFs competitor - Wrong-Klik Framework. With such plugins as "finish this project", "Get the idea", "Solve this problem", "Earn money for me" and less spectacular but still effective "Wire diagonally", "Zoom out", "Measure wires cross-talking" or "Ask on LAVA why this is not working". Some of us will also welcome "Generate post for alpha thread".
-
When can we expect a working version we can all try out?
Hard to say... Most of he problems on LV is solved or is on the straight way. I'm stucked in Flash/ActionScript mess now. The tool I used has its limits and is not developing in direction I expected. There are hundreds of other tools and libraries but it is hard to find something which satisfy my requirements. And for me - still hardly knowing the subject - it is even hard to judge whether my requirements are satisfied...
September should be realistic.
-
I really don't see how NI could possible have a legal leg to stand on against a NEW file format , i.e. a template for a script to generate VIs from a given input file.....
If speaking as generally as "creating new file format" I would agree. But how specificaly how should this format look like to be usable? It should more or less strictly reflect internal LabVIEW class hierarchy and this may already be treated as reverse engineering - not the VI format, but LabVIEW itself.
And creating such format trying not to mimic class hierarchy? Nonsense - it would look like esoteric programming language (BTW, which of them do you like most? )
In my opinion, even thinking about such a format makes no sense as so many aspects of VI is not exposed (even as private classes): from less important like decoration content, to extremly important like recently discussed event structure management.
All we can afford is human readable (limited) macro programming language... but would it be better than just scripting?
-
Well... I'm just working on sth like this.
Features planned for next release:
- Exporting given VI and (possibly selectable) subVIs up to certain nesting level to navigable SWF file. Only browser with Flash plugin is required to view the file.
- Switchable multiframe structures (Case, Event, etc.) for any nesting level
- Only pictures are exported, not the code
- Docs and connector pane for all exported VIs
- Descriptions displayed as tips for all objects on BD and FP of selected classes (functions, subVIs, vi.lib VIs, terminals, etc.)
- Simple GUI for navigatinon within SWF file: Selectable list of VIs, BD/FP switching, zooming, panning, scrolling
- Exporting given VI and (possibly selectable) subVIs up to certain nesting level to navigable SWF file. Only browser with Flash plugin is required to view the file.
-
It's obvious you are not a marketing guy . What marketing guy would post both advantages and disadvantages in the promotion of their product?
That one who knows real number of disadvantages...
-
Hey Vugie
I've just been playing with VIpreVIEW, this is amazing!
Well done, its really cool
Thanks a lot
If anyone here knows (or wants to know) ActionScript I would appreciate any help.
Traverse wire to source
in VI Scripting
Posted · Edited by vugie
No such object as wire segment exist according to my knowledge. Only joints. Segment is only visual representation of connections between joints. Joint may be either bend, junction, end or loose end. From the joint wire may go to up, down, left and right (any combination for junctions, two directions for bends and one for ends). If selected segment of the wire is a connection of given joint, its 4th bit (0x8) is set to 1. Only in this case bits 5th and 6th (0x10 and 0x20) have sense. 0 for 0x10 means that left joint side is selected (if present) and 1 means that right joint side is selected. Similarly for 0x20 bit for up and down respectively. Note that bits 0x10 and 0x20 have not much sense for junctions - where segments may be selected in up to 4 directions. Two bits are simply too less to describe such situation. Two figure out what is the situation with selection for junction you have to follow the wire further to the next bend and read it out from the bend. What if you have few 4-directional junctions in row? I don't know.
But gb119, what do you exactly need it for? Is Selected property and then first element of Terms[] property not enough to get a source of selected wire?