Jump to content

orko

Members
  • Posts

    576
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by orko

  1. I should be * :clock: :clock: * getting LV 8.0 from the "ones with plastic cards" in my division soon. Of course, that may be months, but I'm trying to push it for March. XControls caught my eye when I first saw mention of them. It sure would be nice to assign functionality to controls that you use more than once. Perhaps I'll wait to put the finishing touches on this particular app until they give me my 8.0? Thanks for the input! Aesthetics. Pure aesthetics Joe (orko)
  2. That's what I'm after, essentially. I was hoping someone with more artistic talent than me had made one that had good picture overlays of the zeros and ones. Or perhaps had already solved the whole "auto-tabbing through an array" while someone is typing one bit at a time? Nope. No text. Just binary. I know I could use a numeric control, but would prefer a more "graphical" one, like the boolean array discussed above. Thanks for your input! I'm thinking more now that I'll have to work these up myself, but if anyone has seen an example like this using boolean or picture ring controls, please let me know. Joe (orko)
  3. orko

    COM PORT ECHO

    I must not understand your setup correctly. Are you saying that you have LabView running on a PC, writing to the COM port, with no device connected? And you're getting echoes? Where's that Holloween "spooky" emoticon.... Anyway, if you are indeed in the above setup, then I would think it was your program, not your COM port that is creating this anomaly. Would you mind posting or emailing it to me? Joe (orko)
  4. orko

    COM PORT ECHO

    ...that didn't work on the last co-worker I had... Anyway, make sure that the serial cable is unplugged before attempting this "percussive maintenance" fix. Joe (orko)
  5. Hello all, I've been tasked to write up some VIs that are communicating to an old microcontroller in a unit through GPIO (this really doesn't matter, but I thought I'd give you an idea of how old the stuff is I'm dealing with ). The old program is written in Turbo Pascal ( ) Anyway, it will be a pleasure to port these over to LabView. I'm wondering, since my old UI used binary 1's and 0's to allow the user to communicate/program registers, is there a set of old school controls somewhere that have been built that make it convenient? Like: Addr: 0|0|1|0|0|1|0|0 Value: 1|0|1|0|1|0|1|0 And an "enter" button to press when you have the right values in them. A plus would be if the control "auto-tabbed" through the bits while you were typing. In other words, clicking on the first bit in Addr and typing "00100100" would fill in the booleans appropriately without having to tab or click again on each bit. Any thoughts/pointers? I'll start mixing up my own if no one can find their keys to the "OMG that's old" locker. Joe (orko)
  6. orko

    COM PORT ECHO

    Anthony, In my experiences the echoing either comes from the application sending the command (local echo) or from the *device* that is connected to the serial port. LabView (the programmer) has control over whether or not the commands are echoed back to the user on the display, but unless there's some sort of command you can send to your device that it understands, LabView has no control over turning a device's echo off. Since you were talking of a false response from the device, I'm assuming that your echo is coming from there. What kind of device are you talking to through the serial port? Perhaps there's a way to turn its echo off? Joe (orko)
  7. I actually found it... Download File:post-3266-1140564729.vi LV 7.0 Joe (orko)
  8. You're very welcome. I hope that you will in the future help contribute to this awesome board! BTW, there are two things you may want to fix in your final.vi. 1) place VISA Close objects on the outputs of the while loop. You can keep the two indicators if you want them, but closing the VISA sessions prevents possible problems in the future (especially if you make a VI into a subVI or make it reentrant). 2) By the looks of it, you're still sending an empty string to the VISA Write object every 50 msec when the program is idle (when no button is pressed). Good luck with your project! Joe (orko)
  9. Thanks Rolf! I didn't think to use both the canonical and the alias names in the indexed array. Nicely simplified example! Joe (orko)
  10. orko

    Reset Messages

    You caught that too, eh Warren? Anyway, if all you're trying to do is clear the indicator, there's two ways that are usually used. One is to use a select or case statement to decide between filling the indicator with the string received (from the hardware) or an empty string. The other is to use an invoke node (right click indicator; Create->Invoke Node) and chosing "Reinit to Default" to set the indicator to the saved default state. I'm kind of unsure however why you would need to clear this particular indicator since you are directly writing to it (not concatenating) and only reading the bytes available on the port. Do you want to eliminate the scroll, or "Reset" the messages in the indicator to an empty string...? BTW, I noticed that you are sending an empty string to your motor every 50 msec when no button is pressed (idle state). Don't you want to instead put your VISA Write inside the case where the button is pressed and place the wait outside in the main loop? Joe (orko)
  11. Attached is one way to do it with the method I described. It should get you on the right track, but let me know if I missed the mark here. Download File:post-3266-1140498851.vi Cheers! Joe (orko)
  12. I agree that there isn't quite enough info in your post about how your program is structured, but what it appears you're after is a state machine. I've attached a simple example just in case it will help you out. Download File:post-3266-1140491062.vi Joe (orko)
  13. Sorry about that. I was hoping to eliminate occurances or using an event structure, which I normally do but wasn't sure if you had any knowledge of yet. That'll teach me for trying to skip steps With WMassey's package and the vi's that have been given to you, I think you should have enough to get the job done. If not, please look at event structures and/or occurances to make my example work a little better. Sorry I don't have time right now to put together an example for you, but will later in the week if you need it. Good luck! Joe (orko)
  14. Thanks for the clarification. What it looks like you needed then was an example of how to format a string conditionally based on the user input, so you get the correctly formatted command out to the motor. The attached example uses a "ring" to select which motor you want, and calculates and formats the string before storing it into a string. Let me know if this is enough to get you going and if any of this doesn't make sense to you. It looks like putting this together with the logic that WMassey gave you should get you the desired results, with a little tweaking. You should be able to take it from here Download File:post-3266-1140387314.vi Joe (orko)
  15. Zero, I'm afraid that is way too vague for me to try and answer. What is your specific question? The third step in your procedure you outlined looked like pure math, so I'm confused about what it is you want help with? Joe (orko)
  16. Ah. Well if all you want to do is compare two arrays (any dimension) and get a "yes/no" if they are equal or not is to do as Louis suggested.
  17. Here's an example. It may need some refinement, but it explains the idea behind "producer/consumer" loops. The consumer loop is where the work gets done. Notice that even if the consumer loop takes a long time to process, the producer loop continues to gather data and store it in the queue. Download File:post-3266-1140219841.vi Hope this helps. I think there are some examples in the help under the keywords of "queues" and "serial" if you need more explanation. Joe (orko)
  18. I'm glad you asked for an intelligent answer, or I would have posted a list like: Electret condenser microphone Electro chemical machining Electronic countermeasures Electronic contract manufacturing Electronic control module Elliptic curve method Error correction mode Extracellular matrix Easter candy monster East coast madness Everybody craves M&Ms Eeeeehaaaw, Country Mama!! </Crazy Mood> Joe (orko)
  19. Thanks for the reminder, i2dx. Error handling is always the fun part
  20. Can you provide an example VI? It would help if you save it for LV 7.1 so more people could look at it (I'm hoping to upgrade to 8.0 next month). What are your settings for the serial connection set at? You probably already verified that your port settings are set exactly to what your instrument specifies, although sometimes it is a matter of tweaking the timeout value, if it is set too low (I think it defaults to 10 seconds though). Are there any errors set when the incomplete reads happen? Another thing to look at is if your data reads are being slowed down by other logic in your VI. It may help to stream incoming data into a queue in one while loop, and perform operations out of the queue in another. Since you have no flow control lines, you may be running into a condition where you miss data when your logic takes more than 500 msec to run. Joe (orko)
  21. Attached a quick example using "Scan From String" in the String Function Palette: Download File:post-3266-1140131641.vi Joe (orko)
  22. That's slick! :thumbup: The only reference that I've found to this is an article in Google's cache from Jim Kring (kudos!) coming from the OpenG tiki (which is currently down probably due to their recent upgrade). There are a lot more of these event callback VI's listed, here's a copy out of the cache (in rtf): Download File:post-3266-1140129786.rtf
  23. Each time a generate occurance instance is called, it generates the same occurance (almost like a constant). You can create more than one occurance value only by placing another generate occurance on your diagram. From the online help (LV 7.1.1): ************************************************************************ Generate Occurrence Details Ordinarily, only one Generate Occurrence node is wired to any set of Wait on Occurrence and Set Occurrence functions. You can wire a Generate Occurrence function to any number of Wait on Occurrence and Set Occurrence functions. You do not have to have the same number of Wait on Occurrence and Set Occurrence functions. Unlike other Synchronization VIs, each Generate Occurrence function on a block diagram represents a single, unique occurrence. In this way, the Generate Occurrence function is similar to a constant. When a VI is running, every time a Generate Occurrence function executes, the node produces the same value. For example, if you place a Generate Occurrence function inside of a loop, the value produced by Generate Occurrence is the same for every iteration of the loop. If you place a Generate Occurrence function on the block diagram of a reentrant VI, Generate Occurrence produces a different value for each caller. Note National Instruments encourages you to use the Notifier Operations functions in place of occurrences for most operations. ************************************************************************ Notice the note. I think you may want to look at using the notifier operations for your purpose. HTH, Joe (orko)
  24. Have you comfirmed the VISA resource name in MAX and timeout value? WMassey's VI ran perfect out of my serial port with the proper VISA resource name, although it did take 10 seconds (for the timeout to kick in). I also was wondering if you tried to communicate with the device from MAX (Measurement & Automation eXplorer). Joe (orko)
×
×
  • Create New...

Important Information

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