or a suggestion for a product enhancement.
I am in the last steps of releasing a system that incorporates data logging. A computer cannot be connected at all times, so it logs to an SD card and then transfers to the computer later. Since it is data logging constantly the SD card cannot be removed to transfer via sneaker net.
PLX-DAQ has all the functions needed expect for one (or two) things.
-
The Arduino system cannot be reset on connect. PLX-DAQ has a check box to not reset on connect. So I can use this to prevent the reset on connect.
-
The Arduino system needs to be notified that PLX-DAQ has connected and the transfer should begin. How can this be accomplished? Can PLX-DAQ send data to the Arduino? I don't see any similar functions already programmed.
PLX-DAQ already does 95% of what is needed, and a whole lot of other stuff. It seems a shame to start over when only one or two features are needed for it to work in my application.
In short, to start, is there a way to have PLX-DAQ send data to the Arduino?
Which version of PLX-DAQ are you referring to? IF it is the original from Parallax, you might look at v2 by netdevil, and comprehensively discussed on this forum. I'm sure it receives commands from Excel. I don't know how you can log data and dump files at the same time. I guess it depends on what you really mean by constantly - and how much data is involved.
I am working with the latest version 2.11 downloaded from NetDevil's link. I'm assuming 2.11 is newer than 2.2, and 2.2 does not mean 2.20 rather 2.02.
Constantly means constantly, it does not stop long enough to remove the SD card copy the file and replace it. Nor will I be able to stop or reset the system, with the exception for planned downtime or maintenance. Those intervals are too far apart or random to wait to extract the data from the system.
Until now, I have avoided serial ports in windows like the plague (lots of work in the past under DOS, remember those days?).
In the past 2 hours I have made great strides. I know the serial parsing needs work, and is likely incompatible with the GET commands included in PLX-DAQ. Those commands use Serial.readStringUntil(10).toInt() at specific times in the (demo) routine. Since I don't know when the CONNECT command will be sent, using those commands weren't working. I have had to change to serialEvent() and build the command interpreter in there.
So far I have been able to connect, have the header sent to excel and then begin the data transfer. Works good.
Problem at the moment is I can't disconnect. The entire DISCONNECT command (just the word 'DISCONNECT') does not get sent before the comm port closes in excel. At the moment, I just need to know how to wait until the TX buffer has been sent.
I'm sure netdevil was talking about commands from Excel but I don't know what version covers that, probably not the latest.
Constantly is a relative term, and meaning merely constantly is meaningless in this world of timing loops. I have no idea why you would want to reset the system but acquiring data off SD shouldn't have anything to do with it. Similarly, removing the card is probably a means of last resort although, if you really do have data and time problems, maybe made quite practical in your case by the simple expedient of having two cards. I imagine there are other methods, like diverting data to a temporary array on receipt of an external command.
Nick_Pyner:
I have no idea why you would want to reset the system but acquiring data off SD shouldn't have anything to do with it.
They don't really, except the demo sketches initiate the transfer by resetting the Arduino.
Nick_Pyner:
I imagine there are other methods, like diverting data to a temporary array on receipt of an external command.
Back to sending the command from PLX-DAQ to the Arduino.
adwsystems:
Problem at the moment is I can't disconnect. The entire DISCONNECT command (just the word 'DISCONNECT') does not get sent before the comm port closes in excel. At the moment, I just need to know how to wait until the TX buffer has been sent.
For now I have added a 2 second delay in the disconnect function, between the time the command is written tot he port and the port is closed. I hate timers like that, I'm hoping someone that knows PLX-DAQ or comm via excel can advise on a more discrete way of determining the command/data has been sent and the transmit buffer is empty.