Jump to content

Mark Balla

Moderators
  • Posts

    607
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by Mark Balla

  1. I would agree with regis. The sensor needs something to tell it that the string is complete. If it is not a LF or CR it could be a non printable character like hex 03. Hyperterminal may be appending a nonprintable without you realizing it. One of the programs I use is called port monitor. It shows exactly what is being written and read from the serial port. you can download it here http://www.sysinternals.com/ntw2k/freeware/portmon.shtml I would start portmon and then use hyperterminal and see what characters are being passed back and forth. good luck.
  2. I needed to do this for a UI device that I built a tester for. the test code didn't use hardware hand shake lines but the customer application did. I found that if you use a property node on a serial visa reference it will give you control of the hardware lines. Hope this helps
  3. I'm Building a production tester that uses a Melexis chip programmer. It came with and Active X toolkit but all the examples are written in VB. I was able to interpret all the VB code except one part. The code below scans for connected devices and returns a "Collection pointer" Sub CreateDevice() Dim PSFMan As MLX90251PSFManager, DevicesCol As ObjectCollection, I As Long On Error GoTo lError Set PSFMan = CreateObject("MPT.MLX90251PSFManager") Set DevicesCol = PSFMan.ScanStandalone(dtSerial) If DevicesCol.Count <= 0 Then MsgBox ("No PTC-04 programmers found!") Exit Sub End If ' Dev is a global variable of type MLX90251PSFDevice
  4. There a couple techniques that I use to help control the size of cluster constants. The first is to arrange the cluster horizontally instead of vertically. The best one I've found is to put the cluster constant in a subvi and draw the icon so it only takes up half the size of a standard Icon There is one thing to note when creating the icon make sure to copy the condensed icon to all three color formats in the icon editor otherwise the 256 icon will overlap others. This is shown by the fat const vi. The editor shows a greyed out area in the icon box that will translate to transparent color when put on the block diagram. If it is white it will overlap. This idea is also very useful for making smaller icon footprints.
  5. We talked about String and hex conversion in this post it may help you to understand why the string to hex doesn't work http://forums.lavausergroup.org/index.php?...3007entry3007
  6. I have to do this sort of thing all the time with field point modules. If you want to make it a little more readable you can convert the array to a strict type cluster and then bundle and unbundle by name. I find it much easier to remember a name instead of a number.
  7. Is it possible to move the label of a terminal on the BD. I was sucessful moving a label on the FP but when I try to change the position of a terminal label the proterty node generates an error. I also tried using the move invoke node but got the same error.
  8. Another option that I use a lot is to put all the information in the item name separated by delimiters. Then write a simple vi to parse out the information. I prefer this method to the array indexing because if I need to add to the list I only have to update the enum and not the conversion vi.
  9. I'm trying to build an application to wire and align my front panel objects. Is there a way to call the alignment tools in LabView through vi server.
  10. 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. I usually program with the bottom 2 and run the media player, internet, TV and konfabulator widgets on the top two.
  11. Would there be a way to do this automatically through scripting?
  12. 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. You still have to run the code every time the data is change but it is easier that doing it manually. 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. Download File:post-584-1106806839.zip
  13. To get the exact backgroud that I wanted on my dual screens I created a 2560x1024 jpg file and set it as my background in windows display properties.
  14. 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
  15. 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. 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.
  16. 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. If this is the case you need to find all the constants that are not linked to the typedef and replace them. Hope this helps.
  17. 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.
  18. 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. 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.
  19. I posted some serial vis it the Hardware section in the beginning of December. take a look at them and see if they help you out. http://forums.lavausergroup.org/index.php?showtopic=927
  20. 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. 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
  21. 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.
  22. 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. If anyone has a more elegant way of converting strings I would be interested in seeing it. Download File:post-584-1103005348.llb
  23. 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)
  24. 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. let me know what you think Download File:post-584-1102347097.vi
  25. with a slight modification that includes the text and numbers in the sort, I think this may be a what were are looking for.
×
×
  • Create New...

Important Information

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