Jump to content


  • Posts

  • Joined

  • Last visited

Contact Methods

LabVIEW Information

  • Version
    LabVIEW NXG 2.0
  • Since

NateTheGrate's Achievements


Newbie (1/14)



  1. OK, this is kind of weird but I am new.. I am trying to trigger on a sequence of two Boolean events A,B, but these events are not active at the same time. And I cannot use a panel button to latch, and then release. If A, and then B, activate Trigger=T, reset. Ignore cases: B then A, B, then B, or A then A. Can I do this with shift registers..or a better idea? I have tried a conditional case in a conditional case?
  2. Thanks for your reply. I modified the LVIEW code which oddly does not seem to call the visa icons and inserted my character filter and counter and now „„F counter functions perfectly. Oddly the VI hierarchy seems to call .vis " Configure Serial Port.vi, Serial Port Read.vi, Bytes at Port.vi, but no VISA.vi. One other weird issue I have is with an integer register I defined. I16 Image Count ...it seems when I initialize it after running it-- it is stuck to 2 and not 1 or zero when I "reinitialize to default". Not sure how you fix this. But this is minor problem. When it starts on execution the first time, the register is zero in Image Count, so while good I am a bit confused why it defaults to 2. Now I need to link this code to a Boolean button = True in another VI. Thanks Everyone. ;<) Nate.
  3. Thanks again for your insights. I tried the to add a "wait on Msec" delay like in (https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019L38SAE) but it did not help. Note my VISA read also has a wait on Msec Icon in it. Adding the flush on buffer made it worse, and I lost most of the data in the read buffer. I tried two "wait on msec": one in the loop, one before, but that did not help much. Again highlight execution always worked much better...so some sort of timing synchronization issue. My microscope is fairly old, so maybe things from c2005 may be the state of its serial ports. My code seems to get framing errors as it reads each line of ascii I think...that is one problem. The good news is LVIEW really read the RS232 excellently, so something in those LVIEW code boxes did the trick. So you are right, VISA can work in the right state. So I will try adapting the LVIEW code here, deleting the write section which I do not need. I will take a look at the search split string next. So making a conditional of a read buffer of 6 with 84 84 46 ( „„F) might work best to avoid confusion with the longer upper strings. Nate.
  4. Thanks for responding. I am passively reading a duplex RS232 spy cable conversation between a microscope being commanded to move to new focus positions and PC. The RS232 spy cable duplex response of the microscope (now improved and believable) looks as follows. I want this to run until stopped by the user. The code endlessly goes as follows... reported by Termite (Ascii on right...note weird double comma characters) terminating in CR each time. I want to trigger on the code string...(best would be the 84 84 46 („„F ))CR to send a Boolean to another VI. before the laser scan. Currently I trigger on the upper one. Termite output... 84 84 c4 86 a5 f2 84 84 46 „„Ć¥ò„„F 84 84 46 „„F (scan) 84 84 c4 86 85 f2 84 84 46 „„Ć…ò„„F 84 84 46 „„F (scan) etc..... When the code is run in Highlighted execution...it almost works, and and (Image Count) counts the scans correctly but with a large delay. But in free run..the image count.does not increase on the front panel. Ascii reads seem to be lost too. So it looks like some sort of timing issue. Remember the RS 232 read is passive, but Termite picks up the code just fine. I also get a VISA framing errors (− 1073807253), a lot...maybe this is a clue. Nate Serial_ Synch4.vi
  5. I have a project reading an RS-232 communication string in LabVIEW on Com1 using a duplex spy cable between a PC and a microscope under control (RTS/CTS). When the microscope receives a command from the PC to move the stage it sends back a serial port ASCII string ending in "CR/0D" about every 15 seconds which I intercept in my spy cable LabVIEW serial read program. I need to capture these "CR" events of byte strings greater than 14 to trigger a Boolean True to eventually activate another VI. For now I use a front panel TRUE indicator. The PC RS-232 communication is easily read in TERMITE, but using the LabVIEW demo serial programs, I get serial VISA framing errors (− 1073807253), hence the need to trap them. I am new to LabVIEW. Tracing (bulb) the code reads the VISA ASCII string once, and then does nothing. Probably something is not being reset in the loop, which should run unless stopped manually. I also need to reset the byte count at each read of CR. Any help gratefully appreciated, as few know LabVIEW here. SerialPortCR-Trig3.vi
  • Create New...

Important Information

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