I have re-written the well know PLX-DAQ to be able to be run on modern Office suites.
What's new in "version 2:
Support for both Office versions 64 bit as well as Office 32 bit
No more installation needed! All within the workbook
I got rid of the selmaDAQ_Ver2.ocx and use API calls now
Fully compatible to all previous PLX-DAQ commands in your code!
Got rid of some old stuff like "Max row size of 65000" (Office limit is 1048576 rows with 64 bit) or Baud rate only up to 128000 (now supports 230400 and 250000 as well)
Added a direct debugging window for better testing as well as a VBA code module for testing and debugging
Setting for selecting where to post data (first most left sheet or currently active sheet)
Disabled the control boxes as Stamp object is no more in use
Tested the code on Windows 7 64bit with Office 2013 32 bit and Office 2013 64 bit - both are working fine.
I would appreciate if anyone could test it further on other operating systems (maybe Mac as well ) and Office versions and post feedback.
All source code is available within the Excel, no more closed DLLs !
Attached is a default sketch as well for you to test the new PLX DAQ if you want to.
Attached is of course the new Worksheet with the new Macro as well.
If you have questions please feel free to ask
Well - it is nearly 2am in Germany right now ... this is going to be a short night ....
(This is just for all google folks that are trying to get PLX DAQ "version 1" to run and have the "Stamp.disconnect" error - this new version will solve the issue!)
Works just fine on Win 7 Pro x64 with Excel 2010. It does require that you allow the macro to run by changing the security level.
One minor problem I had was that it only seems to allow COM port numbers up to 15 and the Teensy I was using was COM30. But I switched to one on COM4 and all is well.
I don't have an immediate need for it but it's nice to have it here ready to roll.
Congratulations and karma. I am not able to test this myself but a lot of users out there are going to appreciate this. I have published PLX notes and I will link to your breakthrough.
Further to COM ports, that is a problem I also have. My main laptop gets Arduino's bluetooth on COM 40 and I can't use PLX with it.
I will try to enhance the COM port list. Performing some basic tests with virtual ports this morning I was not able to use any port greater then 9. Might be I find the time on Sunday to fix it.
Could you two give me some info how you managed to get that high Port number? So I can copy your setting and test.
The port numbers were assigned by the system but you can change an existing port.
Control Panel | Device Manager | Ports
Select the device you want to change and right click on it.
Select Port Settings and click on Advanced. The small drop down selector at the bottom of the dialog gives the current COM number and allows you to change it.
Hey Pete,
all right thanks a lot. I found that information elsewhere on the internet as well but didn't think it was this simple to actually change it Quick question: why are running your Arduino on such high ports then anyway? You don't actually have 39 further COM ports in use do you?
What so ever: I fixed the coding and it is now working with up to 256 ports. Actually port number and baud rate are free text fields now. Just for fun I tested with baud rate 1 (Serial.begin(1) and 400.000 ==> both worked fine 8)
I don't know why it gets to such high COM port numbers. I use Teensys a lot and usually once a Teensy has been assigned a port, it will be that port whenever I plug it in again. But sometimes the system decides to change it and what used to be COM6 is now COM18. Same thing happened when I was using NANO, although not as much because I didn't have as many of them.
Occasionally, I open Device Manager, look at the list of COM ports, including the hidden ones that aren't currently plugged in, delete them all, reboot and then start plugging them in again to get lower COM port numbers.
It works with COM30
For Teensy, and perhaps other processors, I added while(!Serial); after Serial.begin so that the code waits for the port to be opened before sending data to PLX-DAQ.
If (cmdDebugWindow.Caption = "Display direct debug =>") Then
frmStampDAQ.Width = 480
'#### 470
cmdDebugWindow.Caption = "<= Hide direct debug"
Else
frmStampDAQ.Width = 230
'#### 220
cmdDebugWindow.Caption = "Display direct debug =>"
End If
/*
very basic sketch for PLX DAQ test
for new "Version 2.3" of PLX DAQ
http://forum.arduino.cc/index.php?topic=437398.0
*/
int i = 0;
void setup()
{
// open serial connection
Serial.begin(9600);
Serial.println("ROW,SET,1");
Serial.println("LABEL,Time,Value,millis");
Serial.println("ROW,SET,2");
//this command reads the Cell value from the specified cell
Serial.println("CELL,GET,D1,");
Serial.print("DATA,TIME,");
delay(10);
int cell_num = Serial.parseInt();
Serial.print("Value in cell D1 = ");
Serial.print(cell_num);
Serial.println(",");
delay(100);
Serial.println("ROW,SET,8");
}
void loop()
{
// simple print out of number and millis
// output "DATA,TIME,4711,13374"
Serial.print("DATA,TIME,");
Serial.print(i++); Serial.print(",");
Serial.println(millis());
}
Ok i guess there is no real use behind your sketch but the image with the colourful arrows are worth it
Anyways, I changed the code to determine the used Office version (special treatment for Office 365) so the UI looks better now. Also a second improvement got implemented: "custom dev points" where one can post his own VBA code to perform any kind of action based on the information passed and can afterwards decide whether he wants the main code to continue or not (e.g. read every line before it gets posted to the sheet, if the line contains a value equal to 200 do not post to sheet).
Implemented 2 "custom dev points" ("new line was read" and "new data row recognized") which get called by the system automatically and where custom code can be pasted and used (example included in code)
"Ok i guess there is no real use behind your sketch but the image with the colourful arrows are worth it "
Now my feelings are hurt
I added a BEEP and STOPLOGGING case to the sheet, you may want to consider this too.
Maybe enable 'Reset Timer' click and enable the check buttons to the form also.