Oscilloscope Features of FlowKIT
Posted: Thu May 13, 2010 9:32 am
The FlowKIT device comes with a large USB microcontroller to control the USB functionalities of the device. As well as performing the main functionality there is some free memory on these USB chips and a lot of free I/O pins so we have created a very basic scope interface to add to the capabilities of FlowKIT. Basically we have provided connectivity for up to 12-digital channels and 2 analogue channels to be monitored and logged. This allows you to gain a further insight into what is actually happening on the hardware and can also be used to investigate how different bus technologies work.
For now, the scope capabilities are fairly low level but we feel that the software would be better out in the public rather then locked away awaiting a full-scale development upgrade. Therefore, here is the public release of the front-end software to drive the scope functionality.
To work with the scope all you have to do is plug in your FlowKIT to the USB and then select the device from the drop down list. Any compatible devices that are connected will be automatically added to the list. The open and close buttons allow a connection to the device to be established or terminated. Remember to open the device before you start using it and to close the device before you use it for ICD. Once you have opened a particular device you can use the user interface to specify the channels to sample, the drawing style of the output and the time period of the sampling. If you are sampling at a high speed or over a long period of time then you may need to use the log functionality to keep track of the data so you can view it later.
The Rate control handles how quickly FlowKIT samples where as the Time/Div control handles how the data is plotted on to the application.
The Log check box will enable a write to a text file named “output.log” which lives in the same folder as the scope application. Each line of the log file contains the transaction between the USB PIC device and the computer. This allows you to see how much data is coming in on a single transaction. To modify the log file for use with a plotting program like Excel you can use a free text editor such as TextPad or Notepad++ to search and replace the following.
Firstly ensure you have regular expression enabled and then perform the following search and replace functions.
1) Search for \n and replace with nothing. This gets rid of all unwanted new lines.
2) Search for , and replace with \n. This replaces all commas with new lines to allow for unlimited amounts of data.
This allows the output to all be all on one single column and therefore will create a constant stream of data of any length to be used with Excel. If the commas are left in then there is a limit on how many columns you can use with Excel. This limitation however does not exist with rows. Once you are done simply rename the file extension from .log to .csv and the file will open directly into Excel. Please note that this will only work for a single analogue channel or a single bank of digital channels.
For now, the scope capabilities are fairly low level but we feel that the software would be better out in the public rather then locked away awaiting a full-scale development upgrade. Therefore, here is the public release of the front-end software to drive the scope functionality.
To work with the scope all you have to do is plug in your FlowKIT to the USB and then select the device from the drop down list. Any compatible devices that are connected will be automatically added to the list. The open and close buttons allow a connection to the device to be established or terminated. Remember to open the device before you start using it and to close the device before you use it for ICD. Once you have opened a particular device you can use the user interface to specify the channels to sample, the drawing style of the output and the time period of the sampling. If you are sampling at a high speed or over a long period of time then you may need to use the log functionality to keep track of the data so you can view it later.
The Rate control handles how quickly FlowKIT samples where as the Time/Div control handles how the data is plotted on to the application.
The Log check box will enable a write to a text file named “output.log” which lives in the same folder as the scope application. Each line of the log file contains the transaction between the USB PIC device and the computer. This allows you to see how much data is coming in on a single transaction. To modify the log file for use with a plotting program like Excel you can use a free text editor such as TextPad or Notepad++ to search and replace the following.
Firstly ensure you have regular expression enabled and then perform the following search and replace functions.
1) Search for \n and replace with nothing. This gets rid of all unwanted new lines.
2) Search for , and replace with \n. This replaces all commas with new lines to allow for unlimited amounts of data.
This allows the output to all be all on one single column and therefore will create a constant stream of data of any length to be used with Excel. If the commas are left in then there is a limit on how many columns you can use with Excel. This limitation however does not exist with rows. Once you are done simply rename the file extension from .log to .csv and the file will open directly into Excel. Please note that this will only work for a single analogue channel or a single bank of digital channels.