07-13-2015 06:22 AM
Hi,
Im working on this project where require interface encoder and accelerometer at one-time. I tried to read the serial data and use it to plot a graph( real-time).
Problem;
1. Everytime i run it will always pop-out error
2. There are delay in signal in labview when i try to read through real-time graph.
Thank you,
Effendywoo
Solved! Go to Solution.
07-13-2015 07:20 AM
Your pictures are tiny. I can barely make out what the error code was.
Your format string for hte Scan From String is not matching the data coming in. Do you have an example of the data string going into the Scan From String?
07-13-2015 07:46 AM
Here is my example data,
Note: "the value zero is for the encoders value (2 dc).
The error pop-out,
Thanks,
Effendywoo
07-13-2015 07:52 AM
What is the character seperating those numbers? Tab? Space? Some other non-visible character?
07-13-2015 08:01 AM
Only space that seprate the data,
Example;
Row1 Row 2 Row3 Row4 Row5
Time Encoder1 Enc2 X-axis Y-axis
0.5 100.2 120.8 67 87
1.2 200.4 300.4 20 21
Regards,
Effendywoo
07-13-2015 08:02 AM
I suspect (arg 1) is empty!
What is in your "substring"
You have to write code to make sure what you read back from the VISA read is valid before passing it to the "Scan From String"
Did the VISA Read throw an error?
What is the termination char setting for your VISA read?
07-13-2015 08:05 AM
Hi Omar,
Visa read does not throw any error. here is the data i get when i try to probe after "String subset".
Regards,
Effendywoo
07-13-2015 08:16 AM
@fendy90 wrote:
Only space that seprate the data,
Then your format string needs to have the spaces. So your format string should really be "%f %f %f %f %f".
07-13-2015 08:18 AM
@fendy90 wrote:
Hi Omar,
Visa read does not throw any error. here is the data i get when i try to probe after "String subset".
When dealing with instrument communications, it helps a lot if you change the display style of those indicators to be "\ Codes". Then it becomes obvious what is seperating your data.
07-13-2015 08:41 AM
What do you mean by changing the data to "codes"? I try to format as "%f %f %f %f %f" and it seems not working out.
Regards,
Effendywoo