06-11-2025 03:55 PM
Hello All
I am currently trying to get this CO2 Probe to accept Serial Commands without using Putty.
https://docs.vaisala.com/v/u/M210514EN-E/en-US
It uses RS 232 protocol. I am getting data however, when trying to set the interval to 5 seconds as shown in the User guide linked above(pg 34), it keeps outputting at 1second (unless i change it via Putty).
Attached is the VI i've been tickering around with.
I have also looked at this forum post and followed the links provided but still nothing has help.
https://forums.ni.com/t5/LabVIEW/Command-PUTTY-without-user-intervention/td-p/4161220/page/2
Solved! Go to Solution.
06-12-2025 04:54 AM - edited 06-12-2025 04:56 AM
Hi Al,
@AlAlexis wrote:
It uses RS 232 protocol. I am getting data however, when trying to set the interval to 5 seconds as shown in the User guide linked above(pg 34), it keeps outputting at 1second (unless i change it via Putty).
What exactly do you send to your device?
Set the string constant (with your command) to "\-code display" mode (and set the display mode indicator to visible!) to check the string content.
Setting the TermChar usually defines the reading part, not the sending part (by default).
(The same applies to the "read buffer" indicator.)
I recommend to use the "right angle bracket" as TermChar for reading device responses. According to the "NOTE" in your image this will be the last char of each response…
And keep in mind: we cannot run/edit/debug images within LabVIEW!
06-12-2025 09:16 AM
Thanks for your timely response,
I dont know why the VI did not upload when i posted the question.
I recommend to use the "right angle bracket" as TermChar for reading device responses. Accordng to the "NOTE" in your image this will be the last char of each response…
Ah, guess i interpreted the note wrong, i thought it was saying to use ONE of the three, and just decided to do <cr>
06-12-2025 09:23 AM
Are you stopping the run mode before starting to talk? I would make sure that you are not in run mode.
06-12-2025 09:43 AM - edited 06-12-2025 09:43 AM
Thank your Mr Tim and Gerd.
I took your advise with applying the display mode to properly understand whats happening in the command line and also about the TermChar not applying to Write, After applying the <cr> TermChar (\r) to the write, it began accepting the STOP command as Mr. Tim suggested, That allowed me to start sending commands to the Device(it was right there in the manual!😅)
This is how the write portion of the VI looks now (hope updated VI uploads this time)
06-12-2025 09:50 AM
Hi Al,
@AlAlexis wrote:
This is how the write portion of the VI looks now
You still don't show the display mode indicator at your string constant: right-click->visible items…
When you set the "run mode" to output data each 5s then you should set that once and not with every iteration.
Then you can run the read loop without any wait function as the device sends a command each 5s and VISARead will wait for the full message - as you hopefully defined the correct TermChar now…
06-12-2025 10:10 AM
OK This is how I would get started.
06-13-2025 02:32 PM
Good day Mr. Tim and Gerd
With your advise and guidance, i was able to implement 2 serial devices and DAQ device into my V.I, I have already marked the reply that helped me the most as a Solution. Attached is my completed VI this logs data from 3 devices.
Vaisala GMP343- https://docs.vaisala.com/v/u/M210514EN-E/en-US
METONE AIO2- https://metone.com/wp-content/uploads/2023/03/AIO-2-9800-Manual-Rev-G.pdf
Vaisala WMT700- https://docs.vaisala.com/r/M211095EN-K/en-US/GUID-EFB0BD6A-586A-4EA5-BD42-2B6E05BD0F00/GUID-502D9B55...
Please have a look at the V.I and feel free to comment on my mistake/inefficiencies.
Thanks
Al Alexis
06-16-2025 11:50 AM
I would make the Visala, DAQ and Metone Loops into their own loops. All this loop would do would be to collect data to send to a data logging loop. You can use queues or other methods to do this.
I would get rid of the dynamic data type (Orange to Blue) data types. These are slow and should not be used. Look at using the write to data file in the file part of LabVIEW. You can use an array to write the data directly without needing to do this conversion.
Look into a producer consumer architecture. This is a better way to handle processing your data. Each loop from above will produce data to be consumed by your data logging loop.
Look into a state machine architecture. This will allow you to build code that can be more flexible and easier to maintain. An example of this would be to handle an error in a loop and reset the loop before you need to take data again. This would keep you from having to restart you code to recover from a bad connection or a dropped connection for one of the devices that you are logging from.
06-16-2025 12:27 PM
I tried to make a simple version of a state machine for the Vaisala loop for you to look at. You should take a look at this example.