Go Down

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

Power_Broker

@NetDevil,

I looked at your zip file and all of it can be version controlled through GitHub - even your xlsm file.

I highly suggest you host the files through GitHub - it will make things easier for everyone (including yourself).
"The desire that guides me in all I do is the desire to harness the forces of nature to the service of mankind."
   - Nikola Tesla

ranbros

Hi to everyone,

I need to know if there is a way to create a circolar buffer to data.
Is there a command to restar to cell a2 when a number of data is reach without deleting previous data?

I have try CREARDATA or CLEARSHEET but this delete all previous data.

my objective is create a continue plot system.

Best regards

Davide

NetDevil


I looked at your zip file and all of it can be version controlled through GitHub - even your xlsm file.
@Power_Broker:
thanks for looking into that. I'll try to get upload to git with the next release (ok that might take some years based on the current progress ... ) or maybe intermediate someday. But I'll definitely switch to git as I personally appreciate the concept of it.





I need to know if there is a way to create a circolar buffer to data.
Is there a command to restar to cell a2 when a number of data is reach without deleting previous data?
I have try CREARDATA or CLEARSHEET but this delete all previous data.
@Davide:
yes, there is a way. You might use the ROW command to make Excel fill data at a certain row once again.
Use use a counter and increase it everey time you send out data, then use a modulo division for the counter to set it back to e.g. 2.

Code: [Select]

int counter;
counter = 2; //based on your starting row in Excel

void loop() {

    Serial.println((String) "DATA,DATE,TIME," + someVariable);

    if(++counter % 30 == 0) { counter = 2; Serial.println("ROW,SET,2"); }
}

(all code from the top of my head. Syntax errors might occur)

ranbros

Thanks NetDevil. now it works.
I'll ask you:
- if I use PLX-DAQ-v2-AutoGrapher-RandomValue.xlsm I have the following error (with Excel 2007)
SYS: |15:44:18| ## ERROR within command ! ##  438 / Proprietà o metodo non supportati dall'oggetto
|15:44:18| DATA,DATE,TIME,1093,217
SYS: |15:44:18| ## ERROR within command ! ##  438 / Proprietà o metodo non supportati dall'oggetto
|15:44:18| DATA,DATE,TIME,1042,180
SYS: |15:44:18| ## ERROR within command ! ##  438 / Proprietà o metodo non supportati dall'oggetto
|15:44:18| DATA,DATE,TIME,992,484
SYS: |15:44:18| ## ERROR within command ! ##  438 / Proprietà o metodo non supportati dall'oggetto
if I use PLX-DAQ-v2.11.xlsm works without errors the same  PLX-DAQ-v2-AutoGrapher-RandomValue.ino
It is due to old Excel?
- Is there a trick to avoid the latency due to plot graph?

Thanks

Davide

OneLeafAutumn

Hello,

I was wondering if the Excel file of the PLX-DAQ be converted to .csv format automatically? I mean, not going through File > Save As. Or at least be able to have a copy of the data in the Excel file be saved as .csv format.

Thank you,

OneLeafAutumn

NetDevil

- if I use PLX-DAQ-v2-AutoGrapher-RandomValue.xlsm I have the following error (with Excel 2007)
SYS: |15:44:18| ## ERROR within command ! ##  438 / Proprietà o metodo non supportati dall'oggetto
|15:44:18| DATA,DATE,TIME,1093,217
if I use PLX-DAQ-v2.11.xlsm works without errors the same  PLX-DAQ-v2-AutoGrapher-RandomValue.ino
It is due to old Excel?
Hi Davide
yes this might be an Excel issue. The example tries to update the graph object to automatically refresh the visual. Might be that Excel 2007 simply does not support that yet. The Arduino code is pretty simple and just pushes data to Excel. It will work on mostly all modern PLX DAQ versions. Just the graph update is the fancy thing to show here.

- Is there a trick to avoid the latency due to plot graph?
I don't quite understand what you mean? The latency in updating the graph or in sending data from Arduino to Excel? I think the graph updating speed depends mostly on your PC performance. In the example it is just two lines of code with native Excel VBA - should be super fast.






I was wondering if the Excel file of the PLX-DAQ be converted to .csv format automatically? I mean, not going through File > Save As. Or at least be able to have a copy of the data in the Excel file be saved as .csv format.
Hi OneLeafAutumn,

sorry hadn't had the time to respond to your private message yet... but thanks for posting the question to the board as well. In here it will definitely help others as well.

So basically there is no option yet. no. I just did a bit of research and it can be easily accomplished. Open the marco code editor of PLX DAQ, there open the frmStampDAQ (so to see the code of PLX DAQ) and search for CASE "SAVEWORKBOOKAS". You can see the different types of commands that exist.

Just add this new one:
Code: [Select]

Case "SAVEWORKBOOKASCSV"
    Application.DisplayAlerts = False
    WStoUse.Copy
    ActiveWorkbook.SaveAs Filename:=ThisWorkbook.Path & "\" & DataVal(1) & ".csv", FileFormat:=xlCSV, CreateBackup:=True
    ActiveWorkbook.Close
    Application.DisplayAlerts = True
    txtStatus2 = "Workbook saved as '" & DataVal(1) & ".csv' by command"


Afterwards in Arduino code you should be able to use the following line:
Code: [Select]
Serial.println("SAVEWORKBOOKASCSV,exportFileName");
It should save a copy of the sheet where the data is currently being posted to in the same folder as the main Excel file by the name exportFileName.csv
Any feedback if it is working is welcome :)

And with regards to your other question: PLX DAQ only posts the current date and time to the Excel sheet. There is no function for sending the current date and time to the Arduino. Although as shown above new and / or own functions can be included in the code easily ;-) feel free to give it a try.
In case you only need the date and/or time in Excel when logging data then yes: RTC module (DS3231) is not needed any more.

ToniLab

Hi NetDevil!
First of all, thank you so much for your work. I use your program to read a load cell and it works great.
I just want to report a little issue: using "Arduino Nano Every" the "Reset on Connect" flag does not work.
I suspect because of the ATMega4809, but I will wait for your opinion.
Do you have any suggestions or solutions?
Thank you!
Best regards

ToniLab

NetDevil

using "Arduino Nano Every" the "Reset on Connect" flag does not work.
I suspect because of the ATMega4809, but I will wait for your opinion.
Hi ToniLab,

unfortunately I think so too :) digging a bit more into the rs232 documentation I was following the path of RTS and DTR flags used by PLX DAQ to reset on startup. Looks like those pins are used with esp8266 boards a lot, with other boards it might behave differently or even worse by USB it might behave differently. In case you are an C / Arduino enthusiast and want to check how the Arduino IDE is handling the reset for all boards in general I'll gladly try to implement a more universal solution :) Although I guess no one else has reported the same kind of issues yet (?)

TonyParakka

Hi NetDevil!   

First, THANK YOU for creating and sharing this fantastic tool!  It has helped me so much already! 
I have it working quite well, receiving and plotting data from an ESP32 board, at 9600baud.
I also have the Autographing working, plotting my data.

I find after a while Excel stops running..  I wonder if it could be from having collected way too much data?
I send a new record DATE, temperature, millis(), pressure every 0.25sec.  I'd like to display just the last ~1 minute of data (240 points) but run for hours

Since storing the data is not a priority, would it be possible to create a scrolling array (not a circular array) so that array size remained fixed?  For example,
If an array of 240 points, than at 241st point, the array is moved up 1 row, and the new data is stored in row 243, and so on.  This way, the chart's start and stop remains fixed, and the plot would move smoothly.

Is this possible with commands sent from the Arduino?
I am not terribly familiar with VBA in excel, but want to take this opportunity to learn..
Can you help, or point me to how I can do this? 
Many thanks!

jdechow

Hiho,

first of all thanks for that great work!

I perpared a little test with the classic 10k poti analog read on a NodeMCU ESP8266 Board. when i open the spreadsheet and set the COM Port + Baud (9600 even tho I'd like to use more but 9600 is enough for testing). When i connect the system seems to work properly, but unfortunatly the Data Aquisition stops after 30...50 samples and Excle closes. Im using WIN10 64-Bit and Excel 2013. I post my Arduino IDE Code down below.

Cheers, Hannes!
Code: [Select]


/*
 * Oszi using "PLX DAQ v2"
 *
 */


void setup() {

  // open serial connection
    Serial.begin(9600);

    //Serial.println("CLEARDATA"); // clears sheet starting at row 2
    Serial.println("CLEARSHEET"); // clears sheet starting at row 1
    
  // define n columns named " ", " ",...
    Serial.println("LABEL,Date,Time,AnalogRead,millis");

  // set the names for the 3 checkboxes
    Serial.println("CUSTOMBOX1,LABEL,Stop logging at 250?");
    Serial.println("CUSTOMBOX2,LABEL,Resume log at 350?");
    Serial.println("CUSTOMBOX3,LABEL,Quit at 450?");

  // check 0 of the 3 checkboxes (all false)
    Serial.println("CUSTOMBOX1,SET,0");
    Serial.println("CUSTOMBOX2,SET,0");
    Serial.println("CUSTOMBOX3,SET,0");
}

void loop()
{
  int value;
  value = analogRead(A0);

    // simple print out of number and millis. Output e.g.,: "DATA,DATE,TIME,TIMER,4711,13374,AUTOSCROLL_20"
      Serial.println( (String) "DATA,DATE,TIME," + value + "," + millis() + ",AUTOSCROLL_20" );
      delay(1);
      // alternative writing method:
        /* Serial.print("DATA,DATE,TIME,TIMER,");
        Serial.print(i++); Serial.print(",");
        Serial.println(millis());
        Serial.print(","); Serial.println("SCROLLDATA_20"); */
}


jdechow

I may have found the problem already, i dont think Excel can match the data rate... If i use higher delay values it works just fine... Bummer, is there a way to collect data every ~Millisecond (+-)
Cheers, Hannes

TonyParakka

Hi All,

Has anyone run PLX_DAQ within the spreadsheet application in WPS Office?
When I tried, I cannot get the macro to launch..
Any help very much appreciated!

-tony

Go Up