Jump to content

Mark Balla

Moderators
  • Posts

    607
  • Joined

  • Last visited

  • Days Won

    41

Posts posted by Mark Balla

  1. I have been thinking of checking out the Matrox card that does three monitors, you can never have enough real estate ...

    3829[/snapback]

    You don't need a 3 port graphics card to get more than 2 monitors to work together all you need is a open PCI slot and a dual head PCI

    graphics board.

    At home I have a 4 monitor system 2 19" and 2 17" using an ATI 9600 AGP and an ATI 7500 PCI. Windows XP finds the second card and adds

    it to the display properties.

    post-584-1107923301.png?width=400

    I usually program with the bottom 2 and run the media player, internet, TV and konfabulator widgets on the top two.

  2. The biggest gotcha for me when starting was figuring out that when you change the class data type, you have to go through the "CLASSNAME/Core/CLASSNAME Object Data Store VI Ref Type.vi" and right-click the  VI Refnum control->Select VI Server Class->Browse and then link to the "CLASSNAME/Core/CLASSNAME Object Data Store.vi" file.  This wasn't documented anywhere, and really REALLY annoyed me, to the point that I almost abandoned using OpenGOOP entirely.  However, once I figured this out I've been okay. 

    3679[/snapback]

    Originally when Open Goop came out the data cluster was flattened to a string before it was sent to the data store. So the VI Ref type (connector pane)was the same for all data (refs,string and error clusters) and the link would never need to be changed. Flattening and reconstructing the data every time you read or changed the data created a lot of wasted cpu cycles. I ran into a problem where I had image references inside my object data and converting them to a string caused huge memory leaks. The documentation probably was written before the data as a cluster was put into the data store.

    But there is a fix without having to manually relink all of the vi refs

    Jim Kring help me with this solution.

    First find the VI Refnum inside the Data store VI Ref Type.vi and make it a strict type def.

    Then use the following code to relink the vi ref to the data store.

    post-584-1106804713.png?width=400

    You still have to run the code every time the data is change but it is easier that doing it manually.

    Although it's gotten so annoying trying to re-do this every time that I've since made my class data type a variant, and then throw all relevent parameters into attributes.  [i've actually found that using the attributes of variants is more useful than the data of the variant themselves.]

    Anyway, I've been successfully using OpenGOOP after this, but I still don't know if I'm doing it right.  I wouldn't be surprised if some of the OpenGOOP developers would laugh out loud if they saw how I use OpenGOOP in my VI's, but due to the lack of decent instructions I've eventually kind of hobbled some understanding.

    3679[/snapback]

    I would be interested in seeing an example of using variant attributes as data storage. So I'll show you my Goop template folder if I can see yours.

    My template is a moderate modification of the Goop template. I like to use colors to signify my classed instead of headers. I also use graphics in my references for a little added cool factor. The main thing I do that Open Goop doesn't is check for valid references every time I read and write.

    In the upper left corner of the MAIN BD is the relinker. I you change your data open this vi and run it and all should be fixed.

    post-584-1106807068.png?width=400

    Download File:post-584-1106806839.zip

  3. Taking Programs that work and improving the code now has an offical name called refactoring.

    LTR magazine has an article this quarter that talks about this topic.

    I have also inhearted large programs with globals every where. I used the LV type 2 global method to handel the problem.

    I added my method to you example code so you can compare.

    Because I'm a poor speller\typist I prefer to put all the variable name in an Enum type def and select the name from the list.

    You mentioned that there were about 600 instanses throuout the program. In my mind that means 600 potential mispelled\mistyped bugs.

    Download File:post-584-1106109069.llb

  4. There are 2 things you can do to solve this problem

    The first is to go the the control on the front panel set the value you want

    and make it the default value.

    post-584-1105725056.png?width=400

    However I would recommend that you connect this control to an input terminal

    and wire a constant to in in the calling vi. This method makes it easier to read the

    code and easily allows the com channel to be changed later.

    post-584-1105725080.jpg?width=400

  5. I have seen this problem before.

    It happened in a state machines where one of constats to be fed back through the shift register

    is a control not a type def.

    Initially everything looks fine but when the typedef is changed the control constant

    does not update.

    The common exit tunnel in the case structure now has two separate enums wired to it and

    it reverts to an integer which changes the case structure display.

    coercion dots should show up on the exit tunnels to indicate this.

    post-584-1105721152.jpg?width=400

    post-584-1105721180.jpg?width=400

    If this is the case you need to find all the constants that are not linked to the typedef and replace them.

    post-584-1105721533.jpg?width=400

    Hope this helps.

  6. Very cool Thread thank's for starting it :thumbup:

    I came up with this one while trying to program while rocking my 6 moth old daughter to sleep.

    I bought a ms optical mouse which has 3 additional programmable buttons.

    I programmed the buttons to the 3 keys I used the most in LabView Ctrl,Shift, and Delete.

    I was amazed at how much faster I could do things when It only required one hand.

    example:

    Copying objects one handed

    Select (left mouse)

    Add to selection (Mouse Shift, Left click)

    Copy objects (Mouse Ctrl, Drag Left click)

    Copy objects in line (Mouse Ctrl Shift, Drag Left click)

    It also makes it easier to do short cuts

    Like (Switch Windows)Ctrl-E , (Save)Ctrl-S

    You only have to tap the keyboard with one finger instead of contorting you hand to push 2 buttons at once.

    Every machine that I program on now has a programable mouse.

  7. The reason the dialogue box only happens once is because it is not in a loop. If you add a loop it should solve this problem.

    post-584-1105135420.png?width=400

    another problem that I ran across was the send notifier case is true for 10 ticks or 100 ms.

    this will send a notification twice with a 50 ms timeout and caused me to have to click the ok button more than once.

  8. The reason the outputs don't turn on is because every time you use the Read from Digital Line vi all of the lines on that port are configured as inputs. In the "Turn on Light" case all lines are set as outputs and one is turned on. Then in "Initial React" case all lines are set as inputs which turns all lines off.

    post-584-1103264425.png?width=400

    Dig Multi-line Direction (E).vi from the example finder is a good example of how configure lines individually.

    Only port 0 of the 6025E card will allow you to set each line as a input or output. port 1-3

    will not.

    I added the port config and read write vis to your original program.

    let me know if it works or what your final solution turns out to be. :)

    Download File:post-584-1103264401.vi

  9. Having a bit of a problem with writing to a digital line here for some reason.  (6 digital lines actually)

    The piece of code I'm working on is a state machine that once initiated, waits a random time between 1 and 6 seconds, then lights a random light between 1 and 6. (Turn on Light State) At the same time I'm lighting an LED on the screen, I'd like to enable a hardware LED. 

    I also need to reset the display and the LEDs at the beginning of each test. 

    The initial piece of code only enabled LEDs on the user screen.  But now I'm to add actual hardware LEDs as well. 

    I can toggle the lights no problem using the Digital Line Write.vi, but only outside of my code.  I've tried a number of different configurations from within my .vi  but so far I haven't figured out what the problem is yet. 

    I think there may be a conflict with one Digital Line Read.vi I'm using in the code.  Perhaps I cannot have both reads and writes on the same port?   

    I'm really hoping to have this working by Friday, otherwise the black belts I'm demonstrating the unit to might take it out on the poor programmer!    :(

    Any assistance would be greatly appreciated.

    I'm including a current copy of my code.  Code is written in LV 7.1

    3067[/snapback]

    Just reviewing you code quickly I notice that you code doesn't tell the digital IO vis what device you are using so it will use what ever the default is set at. Try wiring the device or task into the vi and see if that helps.

  10. Yes I am aware of that, but the fact remains that the Match String function does not differentiate between a hexadecimal input and a string input. One would expect that when looking for a hexidecimal string, the string would be matched exactly as it appears.

    3002[/snapback]

    Ok, We want to use the power of the search string primitive which is designed for normal strings but send it hex display values.

    How about a hex to normal and a normal to hex converter.

    post-584-1103005086.png?width=400

    If anyone has a more elegant way of converting strings I would be interested in seeing it.

    Download File:post-584-1103005348.llb

  11. The match string function does not work when trying to match the Hexadecimal string C8 2B.

    It will only return C8 as a match.

    2959[/snapback]

    If you convert the search string from hex display to \code display you will see that 2B is a + sign.

    If you look up the help on the match pattern and click on the special characters link you will see that a + is a special character. It also say that in order to search for a + it must be proceeded by a \ (5C hex)

    post-584-1102395658.png?width=400

    post-584-1102395740.png?width=400

    post-584-1102395763.png?width=400

  12. Still seems to be a little out.

    Heres the one I was working on anyway, if you are interested. Its Nearly correct :S

    It seems to at least group similar names anyway  :blink:

    2941[/snapback]

    OK lets try this one.

    Asumption are

    no more that 4 revision levels (1.2.3.4)

    revision levels are seperated by a dot (.)

    no numbers allowed in file name.

    here is how my test ran.

    post-584-1102347056.png?width=400

    let me know what you think

    Download File:post-584-1102347097.vi

  13. The names of these functions is not clear.

    Fract/Exp String To Number accutally works on Dbl,Sng and Exp. not sure why they have fract in the name.

    Decimal String To Number should accually be Decimal String To integer

    If you use the Fract/Exp String To Number function instead of the Decimal String To Number

    you will get what your lookin for.

    post-584-1101753456.png?width=400

  14. I recently came across a UDP problem using the UDP Receive Vi from the LV examples.

    post-584-1098943944.png?width=400

    I brought in a UDP read from the pallet and found when I tried to wire it to the UDP open the wire broke

    post-584-1098944182.png?width=400

    After a few hours of frustration I eliminated every thing except the UDP vis.

    post-584-1098944459.png?width=400

    :headbang:

    I finally figured out that the example primitive uses a TCP reference and the current one

    used a UDP reference.

    post-584-1098944586.png?width=400

    :o

    So this brings up a few questions.

    Does any one know when this change was made? I have several legacy programs that use UDP and most of them were derived from the LV examples.

    Is there an easier way to distinguish between the old and the new primitives?

    If I need to get the old UDP Read,Write, or open where do I look?

    Thanks in advance.

    mballa :blink:

×
×
  • Create New...

Important Information

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