08-11-2014 08:18 AM
08-12-2014 07:02 AM
hey,Thanks
Actually my timer was enabled so it was showing error.Now its showing value in text box proper .
As I send you image in earlier message that S1 is coming first and then S2.So, should I write specific sacn function to read that ??and I am not getting which datatype should use I am using double type.
currently I am using this:-
Scan(read_data,"%s[i6]>%f",&torque);
Scan(read_data,"%s[i6]>%f",&rpm);
because I want to ignore first 6 byte (S1,NT,) & (S2,NT,) but its not working display dosen't show any value (torque,r.p.m).
08-16-2014 04:44 AM
hey, can you please reply me answer as soon as possible beacuse I am working on this project 5 days more
08-16-2014 06:14 AM
Why don't you use the time to learn about
In programming, try to 'cut' your problem into small pieces and solve one by one...
08-18-2014 10:04 AM - edited 08-18-2014 10:05 AM
Hi,
Here is the code I promised. A little late, because of my holiday.
In the zip file attached you will find a CVI project, a screenshot showing the program in action and an Arduino code I used to simulate the sensors. It generates random sensor values.
If you have an Arduino Uno compatible board you can upload the code in it and try the program even if you do not have the sensor with you. But this is completely OPTIONAL.
If the information you gave about the sensor output is accurate, I expect this code should work.
Open the CVI project and build it to create the executable.
Execute the program select the COM port number and hit "Start".
The 2 numeric displays should start displaying the values.
In the sample sensor output you have posted, the values were very small (around zero) so increase the actual RPM and torque in the system if possible. Otherwise the displays wil not move at all and you may think it is not working while it is working but only showing zero.
Hope this helps you solve your problem.
Regards,
08-19-2014 01:30 AM
hey,
Many thanks for your help. Can you please tell me that the program you made I think is in new version of CVI but I am using version 6.0 can I change Run time engine from older version to new one??
If yes can you please tell me how??
08-19-2014 04:07 AM
hey Wolfgang,
Can you please tell me that is it better to save file in excel format or some other beacause I dont know much about this...and tell me example referance to write this incoming data into excel or any format so that I can understand this.
Thanks
08-19-2014 04:32 AM
Hehe... for this kind of question my preferred answer is: it depends...
Personally I would save the data as a simple text file because this is the most general method and the data can easily be used (imported) by other programs.
So the sketch of my code would like like:
OpenFile ( ...)
for ( index = 0; index < number_of_data_points; index ++ )
{
FmtFile ( file_handle, "%f[e3p16]%s%f[e3p16]%s", x_data [ index ], ",", y_data [ index ], "\n" );
}
CloseFile ( ...);
Of course the formatting options are a matter of personal needs and taste: the precision, floating point..., delimiter (comma in my case);
instead of FmtFile you can also use fprintf (...);
Remember that you can conveniently test the different formatting options in the interactive execution window...
08-19-2014 04:47 AM
08-19-2014 10:24 AM - edited 08-19-2014 10:25 AM
Here is the UIR file saved in 7.1 format.
This is the earliest version I can save.
When the warning message about the UIR version comes up, hit Continue.
Maybe the 6.0 version IDE can open a 7.1 UIR file.
I think it worths a try.
Note: Let us know if the project works or not