Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- async function getValuesThenPlotChartsAndTabulateData() {
- let queryUrl = generateQueryUrl();
- console.log(queryUrl);
- const options = { headers: { 'Authorization': `Bearer ${ API.access_token }` } };
- let response = await fetch(queryUrl, options);
- let historianData = await response.json();
- let timeStampsAndValues = historianData['Data'][0].Samples;
- // display error message in case of Historian Error code 7: "Service call to central buffer server fail."
- if (historianData['Data'] === undefined) {
- errorMessage.style.display = 'block';
- }
- let timeStampsAndValues2 = historianData['Data'][1].Samples || [];
- let timeStampsAndValues3 = historianData['Data'][2].Samples || [];
- let timeStampsAndValues4 = historianData['Data'][3].Samples || [];
- console.log(timeStampsAndValues);
Add Comment
Please, Sign In to add comment