delay function? (thingSpeakWrite into same channel based on data insertion) | MATLAB | Forum

Avatar

Please consider registering
Guest

Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

Register Lost password?
sp_Feed sp_TopicIcon
delay function? (thingSpeakWrite into same channel based on data insertion)
Avatar
Vojta1
New Member
Forum Posts: 1
sp_UserOfflineSmall Offline
1
August 31, 2015 - 8:58 am
sp_Permalink sp_Print

Hi,
Is there a way how to write data into the field of the same channel I am doing calculations from? Example - I would like to calculate dew point from temperature and humidity based in field 1 and 2 and write it to field3. If I do it using React app it gives me error because it's trying to perform 2 field writes in 1 second. I suppose a delay function would do the trick but it seems it is not supported. I also tried to use TimeControl to do calculations but it isn't really something I am satisfied with as it writes blank values in case there are no new data in fields 1 and 2. Any idea for a usable workaround?

Avatar
Robert Mawrey
New Member
Forum Posts: 4
sp_UserOfflineSmall Offline
2
August 31, 2015 - 10:31 am
sp_Permalink sp_Print

One approach is to write to a new channel. Your MATLAB code could be set up to read field 1 and 2, perform your dew point calculation, and write to a new channel. You could optionally perform a calculation such as mean or median on your original data and write them to the new channel too. Note that since a channel stores time series data, each time you write one or more fields, a date and time is associated with each of the eight fields like this:

Date and Time Stamp Field 1 Field 2 Field 3 Field 4 Field 5 Field 6 Field 7 Field 8
time 1 Temp Humidity null null null null null null
time 2 null null Dew Point null null null null null

which may not be what you expect.

If you write to a new channel you could get something like this:

Date and Time Stamp Field 1 Field 2 Field 3 Field 4 Field 5 Field 6 Field 7 Field 8
time x Avg. Temp Avg. Humidity Dew Point null null null null null

which may be closer to what you are looking for.

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online: jacktheripper125
25 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 252

Vinod: 164

cstapels: 96

piajola: 75

vespapierre: 63

Adarsh_Murthy: 59

Newest Members:

bbruno22

pudderz

Utkya

Poornak26

LindasHed

reddysiva

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

 

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Administrators: Hans, lee