08-19-2011 03:40 PM
I have to read the output of a Linux OS boot from a unit under test (via a serial RS232 prt), then trigger a write, based on a particular string being read from a buffer (read). There are 25 commands that I have to execute (write) where I have to read the responses of each command and compare the output to make sure the command(s) executed properly.
I am trying to use the Basic Read and Write VISA functions from the LabView tools and I am having no luck.
08-19-2011 04:42 PM
Can you provide us with some details? Any error messages? A VI that we can look at?
Saying "I am having no luck" doesn't give us any clue as to where we can start to help you.
08-19-2011 05:28 PM
I have attached a document on what I am trying to do. I am using the attached VI to try and get the just the login at this point. I am not very good at LabView so please forgive me for my ignorance. I am looking for an out line that I can try and get this working...
08-19-2011 06:20 PM
The first thing I see is that your VI is all out of whack. You took the Basic Serial example and swapped things around in a way that doesn't make sense and won't work.
1. You configure and open the serial port.
2. You check the # of bytes and read the port. Well that is going to be zero because you just opened it.
3. You write something to the port.
4. You wait a bit.
5. Then you close the port. So if you did get any response from the command you wrote, you've just lost it.
Look at the Basic Read Write serial example again.
Then look at the Advanced Serial Read Write. That is a better example in a lot of ways because it does a serial configuration before the loop. Then it does read and write in a loop. Then it only closes the port after you hit the stop button.
08-20-2011 04:15 PM
Besides what Ravens had to say, you have a long, long way to go. You have done nothing about the steps you have to run once the login prompt is detected.
I've done this numerous times for linux and RT OS's and what you need to implement is a basic state machine. There are shipping examples to help you get started.
08-22-2011 05:25 PM
Hello,
Are you able to successfully use the basic serial read and write example code? Try sending just the basic *IDN? command, and see if you can read that back.
If that works out for you, also take a look at the advanced read and write example. We can incoporate that with a state machine to read and write a series of commands. Here is a tutorial on state machines if you are unfamiliar with them.
Regards,
Lisa
08-22-2011 09:55 PM
08-23-2011 07:16 PM
I made my state machine and it works pretty good via the VI interface.
Now when inserting the VI (Read and Write) inbetween a Initialize VI and Close VI I get several errors that are enclosed. This is from a TestStand environment.
The other issue is that how do I go about searching the complete output Read String for a substring or parameter within the Read Back string? Can that be done in TestStand and if so how does one go about that?
08-24-2011 03:26 PM
Hello Ealmeida,
Would you be able to provide the TestStand sequence and VI you are using; at the moment it is difficult to troubleshoot the issue from just the TestStand Report.
Eric
08-24-2011 03:34 PM
Ok. I will zip this up for you and enclose it. I am at a dead end here and I have been trying everything imaginable to first find out what the Failed Flag is within the log file and secondly trying to figure out how to search the expected response for particular strings within it...