File Handling in PRoC

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello,

   

Am using PRoC module to receive the ultrasonic sensor's data and displaying on the terminal using UART Communication. What's my question is, can the data received on the terminal be stored in File(.txt, .docx format)??

   

Is file handling system supports in proc? 

   

 

   

If yes, how can i set a path to create a file and write the data in it. I have given a try but the file is not being created!

0 Likes
6 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

PSoCs and PRoCs do not have got an OS, so there is no access to a file possible.

   

On the windows side you will be able to save data red from a com interface into a file. Will of course need some program written in C++, C# or whatever you prefer. Cold probably be done using a script / batch file.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Hello,

   

On windows end itself i wanted to create a file. In PSoC Creator have created a project and have written a C code(File Handling) to write a data on to the file. But the file is not being created!

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

"But the file is not being created!" Of course not. The PSoC is not part of your PC, it is only connected to it. It is a similar problem to store the mouse movements into a file. Any "C code(File Handling)" on the PSoC side has no OS to communicate with. Use a simple C-code on the windows side which opens the correct com-port and writes data into a file. Think about how to end that process, when the file is not closed, the data may be discarted.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Yea bob even i got the same idea to work on some scripting language and acquire the data!!
Thanks for your time !

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

If you are using a terminal program on the PCV (e.g. realtem, tera-term) - most of thzem have a "log to file" capability which you can use.

0 Likes
Anonymous
Not applicable

Will give a try HLI.. Thank you

0 Likes