Author Topic: Trying to log serial data  (Read 1352 times)

jfedison741

  • Newbie
  • *
  • Posts: 13
Trying to log serial data
« on: January 25, 2010, 12:54:39 PM »
I am feeding a serial smart board an integer followed by a carriage return (hexidecimal 0D) every 10 seconds and am trying to log this data using the data logging feature of iobridge.com. The data is not showing up in the log. Is there something else that need to be configured?

The serial data is showing up in the module page in the "Serial Data" window but this data is not reaching the log.

Also, how often does the data get logged from the serial smart board? (there appears to be no "Channel Push Update Mode: " or "Auto Message Period (seconds):" for a channel in serail mode)

Thanks.

iobridge

  • Administrator
  • Hero Member
  • *****
  • Posts: 669
    • ioBridge Support
Re: Trying to log serial data
« Reply #1 on: January 25, 2010, 01:48:33 PM »
Are you using the Serial Web Services API?

http://www.iobridge.net/wiki/api/serial-web-services-api

The format should be the following:

Code: [Select]
[[[data_log|key|timestamp|data]]]
I would remove the carriage return. The serial message gets added to the data log when the end brackets gets reached "]]]".
ioBridge Support
Community Team

jfedison741

  • Newbie
  • *
  • Posts: 13
Re: Trying to log serial data
« Reply #2 on: January 25, 2010, 02:17:16 PM »
No, I am using the data logging section of the "Modules" dashboard on iobridge.com. I have added a data log to log "External Input" . How do I get this to log data from the serial board?

When I click "View Data Log" and try to download the log, it is empty.
Also, the "Data Source" appears to be an API Key. Whereas I am trying to make the serial smart board the data source.

Am I correct is in thinking I can log data from the serail smart board? I may not have set it up properly. Any suggestions on how to set it up?

Thanks.

iobridge

  • Administrator
  • Hero Member
  • *****
  • Posts: 669
    • ioBridge Support
Re: Trying to log serial data
« Reply #3 on: January 25, 2010, 03:18:37 PM »
Do you have the ability to manipulate the serial string?

All you have to do is change the serial output so it follows this format:

[[[data_log|key|timestamp|data]]]

Replace "key" with the Data Source API Key for that log

Keep "timestamp" blank to use the current GMT time or specifiy your own time (as long as it follows the YYYY-MM-DD HH:nn:00 format)

Replace "data" with the data that you want to log
« Last Edit: January 25, 2010, 03:20:09 PM by iobridge »
ioBridge Support
Community Team

jfedison741

  • Newbie
  • *
  • Posts: 13
Re: Trying to log serial data
« Reply #4 on: January 25, 2010, 05:43:38 PM »
Yes, after putting the data in the above format it is now logging.

Thanks ioBridge for an excellent product!!

jfedison741

  • Newbie
  • *
  • Posts: 13
Re: Trying to log serial data
« Reply #5 on: January 26, 2010, 10:32:10 AM »
I am using "[[[data_log|key||data]]]" to log data.

With the timestamp field left blank, is there a way to make the API generate the time including real seconds (instead of hh:mm:00)? My data is at approx. 60 (+/- 2%) second intervals and the logged time stamp occasionally skips or repeats a minute.

Thanks.

iobridge

  • Administrator
  • Hero Member
  • *****
  • Posts: 669
    • ioBridge Support
Re: Trying to log serial data
« Reply #6 on: January 26, 2010, 09:52:55 PM »
Unfortunately the service's logging resolution is once a minute.
ioBridge Support
Community Team

nick

  • Full Member
  • ***
  • Posts: 174
Re: Trying to log serial data
« Reply #7 on: January 27, 2010, 12:35:23 AM »
You could get the current time using the web services API DATETIME command at the start of your program, and then keep track of the time on your device and populate the log yourself.

jfedison741

  • Newbie
  • *
  • Posts: 13
Re: Trying to log serial data
« Reply #8 on: January 29, 2010, 05:57:46 PM »
Thanks, that sounds like a good way of getting higher time resolution.

The serail-API wiki notes indicate that the [[[datetime]]] transaction replys with the following format:
yyyy-mm-dd hh:nn:ss (GMT/UTC)

Does anyone know if this reply is enclosed in brackets and would the length of the reply (29 characters in the above example) ever change? I assume that the reply will always be in GMT/UTC time. I am trying to determine the best way for the microcontroller to determine where the end of the reply string is.

Thanks.

iobridge

  • Administrator
  • Hero Member
  • *****
  • Posts: 669
    • ioBridge Support
Re: Trying to log serial data
« Reply #9 on: January 29, 2010, 06:10:33 PM »
A valid response is always 29 characters.
ioBridge Support
Community Team