How to read data in more than 2 fields in thingspeak?

조회 수: 9 (최근 30일)
Gcobani Mkontwana
Gcobani Mkontwana 2019년 12월 2일
답변: Vinod 2019년 12월 6일
Hi Team
I have this following URL and want to read data to it, i want to read 2 fields within the URL itself. How can i read 2 or 3 fields to it using below URL? Documentation does not have this including, only 1 fields per each request. Please assist, thanks.
  댓글 수: 6
Christopher Stapels
Christopher Stapels 2019년 12월 3일
The suggested URL does not restrict the number of fields you can read (up to 8), in fact it reads all of the fields that you have data in. If you wanted to discard all of the empty fields, or just select a few of the fields, you could read the data in a MATLAB analysis and process the data there. You could reven write the output to another channel.
I suggest using thingSpeakRead with 'outputformat','timetable'. then you can select the columns from the table that youa re interested in. If you use a MATLAB visualizations script, you can also plot the selected data.
Gcobani Mkontwana
Gcobani Mkontwana 2019년 12월 4일
Chris, that elaboration maybe relevant to other issue i may likely to have. My issue was to read 2 fields from one specific URL using Rest Client only, but it appears i can read up to 8, as well one per field selected. To me this is a problem, especially if we are to read data from our channel using REST client. At this point,i dont need Visualization to do the output because its out of scope to my business rules on thingspeak.

댓글을 달려면 로그인하십시오.

채택된 답변

Vinod
Vinod 2019년 12월 6일
Your RESTClient can read all 8 fields using the documented API and the lines of code in your application subsequent to the RESTClient code can choose the fields you want.
Alternatively, you can use the API to read each individual field using a separate RESTClient call.

추가 답변 (0개)

커뮤니티

더 많은 답변 보기:  ThingSpeak 커뮤니티

카테고리

Help CenterFile Exchange에서 Read Data from Channel에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by