NetDevil:
@Snaggles,
hi there are two ways to solve your problem I think.The first one is to use CELL,SET,ONSHEET,SheetNameX => what didn't work here? The big advantage of the DATA command is that it automatically writes to the next free row; CELL,SET on the other hand does not. For that one to work in your case you need a counter for each probe indicating the current line to write to on the respective sheet. Also please note the information in the Beginners Guide about adding a short delay of maybe 3 ms before each CELL,SET command to clear the buffer. Otherwise many times 0's were written in Excel.
The other option is indeed using VBA and to write an own command like "SETACTIVESHEET,SheetNameX" to set the globally used variable in PLX DAQ to the posted SheetNameX. That way all DATA commands coming in afterwards will be routed to that sheet. The command can be added within the CustomDevPoint function. However I guess there might be issues with the row variable for the sheet since that is a global counter as well I guess. Therefore it should be adjusted as well each time the sheet changes (there is a function to get the currentMaxRow for a sheet).
If I were you I'd start with the first option as all changes can be done in Arduino code.
@NetDevil[/b] Thanks for your reply. I would prefer to get it to work in Arduino myself. Here are some troubleshooting trials I've tried.
If I put in
[/u]** **[u]Serial.println("CELL,SET,ONSHEET,Probe 2");[/u]** **[u]
(Probe 2 is my 2nd sheet name) I get all the data printed on the first sheet still and a Error within command 9/Subscript out of range. I've tried different combinations of commas added in thinking it might be a missing variable confusing it but get the same problem.
If I put in my string that I want printed
[/u]** **[u]Serial.println("CELL,SET,ONSHEET,Probe 2, (String)DATA,TIME,TIMER," + channel_ids[channel] + "," + sensordata + ",AUTOSCROLL_20");[/u]** **[u]
I get nothing printed and an error 13/Type mismatch
If I follow the beginner's guide and do
[/u]** **[u]Serial.println("CELL,SET,ONSHEET,Probe 2,B,2,DATA");[/u]** **[u]
It prints the actual word DATA in sheet Probe 2, Cell B2 just fine but also keeps overwriting it. All the probe data is still printed on the first sheet as well even though I'm not changing the sheet again.
I guess I'm not exactly clear on the syntax of the command or maybe I'm trying to do something that it can't do...?