MOD 54415 best way to save ADC and DAC data
Posted: Wed Aug 06, 2014 7:11 am
I am developing an application where I run a DC motor using MOD 54415. The velocity command to the motor is send using DAC while the velocity feedback is returned through the ADC channel. I write a function which runs the motor (starts the ADC and DAC) and stops it when I want. I want to log the ADC, DAC data when I run the motor.
In the factory example of MOD 54415 I learned that one can setup a ftp server on the netburner and use it to create file and retrieve data using function FTPD_SendFileToClient. After looking at the example the initial scheme i thought of was as follows
- Store data in a memory block when motor is running (I don't intend to run it too long).
- In function FTPD_SendFileToClient access this memory through a function which passes the memory pointer.
- Use this pointer to write data from memory block to a file and transfer the file to my PC.
The problem with this scheme is that I need to call my function which runs the motor through FTPD_SendFileToClient function. So effectively I need to start ftp client on my PC which calls FTPD_SendFileToClient to start or stop my motor.
I would like my motor to run independent of the ftp server functions
hence will it be better if I save my ADC, DAC data in a global variable which can later be accessed by ftp server commands whenever I start the client on my PC? I am having a bit difficulty getting global variables work right now.
Or should I used some shared memory technique to do this so that the ftp server function can access this memory without calling the function to run the motor. What is the way of using shared memory in MOD 54415?
Thanks
In the factory example of MOD 54415 I learned that one can setup a ftp server on the netburner and use it to create file and retrieve data using function FTPD_SendFileToClient. After looking at the example the initial scheme i thought of was as follows
- Store data in a memory block when motor is running (I don't intend to run it too long).
- In function FTPD_SendFileToClient access this memory through a function which passes the memory pointer.
- Use this pointer to write data from memory block to a file and transfer the file to my PC.
The problem with this scheme is that I need to call my function which runs the motor through FTPD_SendFileToClient function. So effectively I need to start ftp client on my PC which calls FTPD_SendFileToClient to start or stop my motor.
I would like my motor to run independent of the ftp server functions
hence will it be better if I save my ADC, DAC data in a global variable which can later be accessed by ftp server commands whenever I start the client on my PC? I am having a bit difficulty getting global variables work right now.
Or should I used some shared memory technique to do this so that the ftp server function can access this memory without calling the function to run the motor. What is the way of using shared memory in MOD 54415?
Thanks