Go Down

Topic: PLX-DAQ version 2 - now with 64 bit support! (and further new features) (Read 27332 times) previous topic - next topic

larryd

But that way the direct debug window is shown on startup already. I wanted to keep it lightweight for starter users.

Is the button generally working with your office version? (should expand / collapse the debug window)
Right, in this case I have it maximized at start up.

480 seems to be just perfect.

Yes on 'Windows 10', Microsoft Office 365 (2016 Excel)  works perfect.

Thanks again!



:smiley-sleep:   12:17AM


.
No technical PMs.
The last thing you did is where you should start looking.

larryd

Private Sub cmdDebugWindow_Click()
   
   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
No technical PMs.
The last thing you did is where you should start looking.

larryd

This is fun.


Code: [Select]

/*
   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());

}



No technical PMs.
The last thing you did is where you should start looking.

NetDevil

Ok i guess there is no real use behind your sketch but the image with the colourful arrows are worth it  :D  :D

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).



=============================================================
This version is already outdated !! Link to always most recent version of PLX DAQ v2 here:

==> https://forum.arduino.cc/index.php?topic=437398.msg3013761#msg3013761 <==
=============================================================




What's new in "version 2.4" aka Change log:

  • Fixed a UI problem with Office 365
  • 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)


Image-Link: http://www.freebie-base.de/Pics/PLX_DAQ_v2.4.png
(hosted on my server, no traffic hijack)





Quote from: Older changelogs
What's new in "version 2.3" aka Change log:
  • Port and baud rate not drop down box anymore but free text fields
  • Port number bug fixed thus ports > 10 can be used (max set to 256 as of modern Windows OS limit)

What's new in "version 2.2" aka Change log:
  • Enhanced 64 bit support (even better stability now)
  • Added a dropdown box to select with sheet to post to (got rid of the radio buttons)
  • Minor adjustment for faster startup of logging

What's new in "version 2.1" aka Change log:
  • --- version never released ---
  • --- it was more of an "internal development version"

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

=============================================================
This version is already outdated !! Link to always most recent version of PLX DAQ v2 here:

==> https://forum.arduino.cc/index.php?topic=437398.msg3013761#msg3013761 <==
=============================================================

larryd

You have done the community a great service.

"Ok i guess there is no real use behind your sketch but the image with the colourful arrows are worth it  :D  :D "
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.

What can I say, well done.

.
No technical PMs.
The last thing you did is where you should start looking.

larryd

Quote
Fixed a UI problem with Office 365
Yes

Quote
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)
'    If (newLine = "CLEARDATA") Then
'        MsgBox "Looks like we are about to get started!"
'    End If

If the above lines are uncommented EXCEL crashes.
No technical PMs.
The last thing you did is where you should start looking.

NetDevil

Mea culpa - I never wanted to hurt your feelings :) It is just the picture looks quite funny and the code behind quite ... unique ;)

I think I get the idea behind your "stop logging" - at the moment this is done by just disconnecting. But ok, there might be a use case behind this. I'll note that for the next version. Thanks for the input.
What do you mean by beep? I am familiar with the VBA "beep" command but I wouldn't know where to place it with any reason. I even removed it from the original code as it annoyed me too much on connect/disconnect :-X
All disabled buttons are disabled for good reasons, as they relate to the old "stamp" module that is no longer in place. Someday I might either remove all parts of it from the macro or code anew, I don't know yet :) The reset Timer is something I haven't dealt with at all at the moment. That's all "old stuff" from version 1.

And yeah, the example code crashes? Good thing it is an example code :) I will change with 2.5 to something as useless but more stable ;) I can image some code like "ignore cleardata if day of month is even" example :)

Thank you very much for testing all versions and providing feedback! It is much appreciated!

larryd

Quote
I never wanted to hurt your feelings
Just joking around.
Thought noobs could trace a command received to what happens on the EXCEL. sheet.


Did something like this:

Code: [Select]
  Select Case DataVal(0)
.
.
.

    'Stop logging.     Under sketch control Arduino stops logging in EXCEL,  LarryD
    Case "STOPLOGGING"
          Call cmdConnect_Click
          
    'Make Beep.        To get attention, Arduino can make EXCEL Beep,  LarryD
    Case "BEEP"
         Beep


And

Code: [Select]
Private Sub cmdResetTimer_Click() 'LarryD
        TimeStart = Timer    
        TimeLast = Timer    
        TimeAdd = 0            
        txtStatus2 = "Timer Reset"  
End Sub
No technical PMs.
The last thing you did is where you should start looking.

CBJARL

Great work! I'm looking at doing something similar in a Windows application.

NetDevil

Hi Larry,
sorry for the late response - somehow I wasn't notified about the two replies. Or I accidentally deleted the mails  :P  dunno

Now I get what you are talking about. Ok. But just as a question: if I don't want the data to be logged I would just stop sending the data from my Arduino to the serial port :-X I am a bit unsure whether to blow up code or not by adding commands .... a screw it - it will be added! "The customer is always right" ;)
I will however add a "Pause Logging" feature in the PLX DAQ UI as well thus one can keep being connected to the Arduino but pause logging from PC side. Both features go hand in hand.

Beep is good as well.

Timer I have to check as I said I never looked at it before. But many thanks for providing a code preview.

I hope I will find time for the next version before Christmas.

@CBJARL: thanks a lot! :)

larryd

IMHO, I would not worry about adding functionality, make it your own.

The point of stoping logging is the Arduino could do this if a certain condition was met while you sleep ;)

Edit:
'Pause Logging' would be good as connection would not be broken

.
No technical PMs.
The last thing you did is where you should start looking.

NetDevil

The point of stoping logging is the Arduino could do this if a certain condition was met while you sleep ;)
sure yes, but look. I guess you would do:

Code: [Select]

void loop()
{

//do Stuff

Serial.print("DATA,TIME,Whatsoever")

if(Sensorvalue==false)
   Serial.print("STOPLOGGING")
else
   Serial.print("STARTLOGGING")

}


Why not to keep it simple rather:

Code: [Select]

void loop()
{

//do Stuff



if(Sensorvalue<>false)
   Serial.print("DATA,TIME,Whatsoever")
}


In the end I do not need to tell PLX DAQ to stop logging (aka ignore input send from Arduino) if I simply not send data from the Arduino to PLX DAQ.

Or am I missing something here?

The Button on the UI for pausing logging will be build in nevertheless. Even with a GET thus Arduino can check for if logging is paused at the moment. Afterwards it won't be a huge thing to implement STOPLOGGING and STARTLOGGING command as well (simple invoke button) I am just not getting the real use case you see :-/

larryd

Quote
Why not to keep it simple rather:
I was thinking a bit further, maybe stop logging, saving the file and then shutting down EXCEL.
Not sure if this can be done in the Macro.


I do like simple. :)


I have used your work several times now and really do appreciate being able to do so.

Thanks for the Christmas present!

Larry


FYI:
You might want to review Megunolink's offering for ideas.
http://www.megunolink.com/


.
No technical PMs.
The last thing you did is where you should start looking.

NetDevil

Duh - I did it.
I reworked lots of the code once more to get it more stable and easier to maintain (added comments, formatted code etc.)
Also I looked at  Megunolink (thanks for the info) but I guess they are just hardcore sophisticated with their Software. PLX DAQ should be for the easy user or at least for pros that would like to build out of the box possibilities for simple consumers. What looks promising is http://docs.blynk.cc/ if you want your data to be available on a smartphone.

@CBJARL: one more thing, you could basically paste 90% of the code to Visual Basic and build a native Windows application. But well - you still need some sheet or further use for the commands received ;)

So without further delay:



=============================================================
This version is already outdated !! Link to always most recent version of PLX DAQ v2 here:

==> https://forum.arduino.cc/index.php?topic=437398.msg3013761#msg3013761 <==
=============================================================




What's new in "version 2.5" aka Change log:

  • Added a "Pause logging" / "Resume logging" button that can (well no surprise) stop the logging of the data without disconnecting the Arduino. The Button is enabled when connected
  • Removed the old 4 checkboxes as the functions are useless without Stamp nowadays and replaced with 3 custom checkboxes. As with old PLX DAQ v1 these checkboxes can be controlled by Arduino code: change text, check/uncheck box, read status of boxed (if checked or not). Codes changed from "DOWNLOAD" / "STORED" / "USER1" to CUSTOMBOX1 / CUSTOMBOX2 / CUSTOMBOX3. "USER2" was removed completely.
  • Moved "Reset on Connect" around a bit for better UI layout
  • Re-implemented the code for "Reset Timer" button. I don't know why I removed that anyways in version 2.1 ....
  • I added a new example sketch that demonstrates the new functions and how one can use them
  • I also rework the example codes in the custom dev points for not crashing Excel anymore - hopefully ;)
  • Added new functions to call in Excel by Arduino:
    • Beep : makes a simple beep
    • Pauselogging : stops printing logged data to the Excel sheet
    • Resumelogging: continues pasting data again
    • Stoplogging : disconnects the Arduino
    • Saveworkbook : simply saves the workbook
    • SaveworkbookAs,Filename : saves the workbook as a new copy in the same folder by the name Filename.xlsm
    • ForcequitExcel: forces Excel to close. Note: the workbook will not be saved by this!



Might be I implemented even further things but I think I lost track of what I did today :D

Image-Link: http://www.freebie-base.de/Pics/PLX_DAQ_v2.5.png
(hosted on my server, no traffic hijack)





Quote from: Older changelogs
What's new in "version 2.4" aka Change log:
  • Fixed a UI problem with Office 365
  • 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)

What's new in "version 2.3" aka Change log:
  • Port and baud rate not drop down box anymore but free text fields
  • Port number bug fixed thus ports > 10 can be used (max set to 256 as of modern Windows OS limit)

What's new in "version 2.2" aka Change log:
  • Enhanced 64 bit support (even better stability now)
  • Added a dropdown box to select with sheet to post to (got rid of the radio buttons)
  • Minor adjustment for faster startup of logging

What's new in "version 2.1" aka Change log:
  • --- version never released ---
  • --- it was more of an "internal development version"

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

=============================================================
This version is already outdated !! Link to always most recent version of PLX DAQ v2 here:

==> https://forum.arduino.cc/index.php?topic=437398.msg3013761#msg3013761 <==
=============================================================

Nick_Pyner

What looks promising is http://docs.blynk.cc/ if you want your data to be available on a smartphone.
I found Bluetooth Graphics Terminal a more or less direct equivalent to the the way I was using PLX.

Go Up