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

Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —






— Match —





— Forum Options —





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

sp_Feed sp_TopicIcon
delay function? (thingSpeakWrite into same channel based on data insertion)
No permission to create posts
August 31, 2015
8:58 am
Avatar
Vojta1
New Member
Members
Forum Posts: 1
Member Since:
August 31, 2015
sp_UserOfflineSmall Offline

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?

August 31, 2015
10:31 am
Avatar
Robert Mawrey
New Member
Members
Forum Posts: 4
Member Since:
August 31, 2015
sp_UserOfflineSmall Offline

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: 166

Currently Online:
33 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 272

Vinod: 240

piajola: 95

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 8665

Moderators: 1

Admins: 2

Forum Stats:

Groups: 3

Forums: 14

Topics: 1600

Posts: 5760

Newest Members:

faaramin, swarnak32, SaiHarish.M, vikas, abhisheksharma, khoshghadam

Moderators: cstapels: 460

Administrators: Hans: 405, lee: 457