05-10-2013 01:20 PM
I need to send a row of data to the excel sheet at 15 minute intervals and later by way of a button.
I'm trying to use DDE but I do not see how to set it up to automatically send the data at given timed intervals.
I want the elftmost column to indicate the time of day. and that row to include several data readings.
Then do the same thing to the next row 15 minutes later. And then stop after I give it a stop switch.
Thanks
Ken
05-10-2013 04:13 PM
You need a relay in front of the DDE Output.
05-13-2013 07:35 AM
Thank you for the quick response. I will be trying this today.
Ken
05-14-2013 07:32 AM
I know that I have to be doing something wrong but still not there.
I've attached a small example of what I need the excel sheet to look like.
Each column needs to automatically fill with the current data every 15 minutes. Then move to the next row down after 15 minutes.
I'm still not getting the row change at 15 minutes.
I appreciate the help.
Ken
05-14-2013 09:53 AM
I need to see your worksheet, too.
05-14-2013 10:44 AM
I've attached the entire worksheet.
Probably plenty of superfluous energy in there.
The issue at hand in at the far right where I am trying to send the data to DDE to Excel rows.
your help is valued.
Ken
05-14-2013 12:20 PM - edited 05-14-2013 12:21 PM
So, there are two things here...
One is how to save the data every 15 minutes, or on demand using a switch.
You can either use a timer, like the TTL Pulse generator that I originally suggested, or, if you want clock time (12:15, 12:30, 12:45....), use a Time Base module and some modulo arithmetic.
If you recall, Number1 MOD Number2 yields the remainder of the division - if you divide the number of seconds since midnight by 900 seconds, then you'll get a value from 0 to 899, where 0 is the quarter hour. The fall from 899 to 0 looks like a Falling Edge. So, use a Combi Trigger to see the falling edge, and output a one sample 5 V pulse (TTL High) to release a value through the relay.
Add a switch, make it one-shot... realize that the Switch outputs a block of samples on every click, so add another Combi Trigger to reduce the TTL High to a one sample pulse.
Use a logical OR to release a sample on the 15 minute event or the switch event
Next, configure the DDE Output. This is what you had trouble with.
You want to send a row of data every 15 minutes. You have 6 data points and a time stamp.
You need to configure the DDE Out module to generate the item, and use it to iterate down the sheet by rows.
Using the Row Column notation, that looks like R3C1:C7, R4C1:C7, and so on... the row number changes.
That looks like this in the Item dialog
Finally, you need the time.... click on the DDE Out Options button to turn on the time channel.
As you see, I put this all in a black box, to help manage the complexity of the worksheet.
05-14-2013 03:06 PM
This looks like what I was looking for. BIG help in getting this thing moving again.
THANKS
ken