+ Reply to Thread
Results 1 to 12 of 12

I'm trying to get real time data from my data-logger in a column using macros. I'm stuck.

  1. #1
    Registered User
    Join Date
    03-12-2015
    Location
    India
    MS-Off Ver
    7
    Posts
    7

    I'm trying to get real time data from my data-logger in a column using macros. I'm stuck.

    I'm very new to macros so I don't understand much.

    I'm trying to get the serial input from a TC08 Thermocouple datalogger to show up in a single column in Excel. The example code they have given with the SDK is below. I'm not able to upload the .dll file.

    The program only updates the values in three cells. 4A, 4B, and 4C every second, but this isn't what I want. I want it to upload the new reading in the next row every second. I'm very confused as to how I can do this.

    Any help will be welcome.

    Regards
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    06-11-2014
    MS-Off Ver
    Office 2003, 2007 & 2010
    Posts
    119

    Re: I'm trying to get real time data from my data-logger in a column using macros. I'm stu

    This is not going to work with the current sheet setup as you have data in cells below the output range, but if you used K, L & M for example:

    Change the Timer1_Timer subroutine to:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-12-2015
    Location
    India
    MS-Off Ver
    7
    Posts
    7

    Re: I'm trying to get real time data from my data-logger in a column using macros. I'm stu

    Thanks for your quick response. The code gave me a Runtime Error '1004' Application-defined or object-defined error for this line varRow = ThisWorkbook.Sheets("Sheet1").Range("K1000000").End(xlUp).offset(1, 0).Row

  4. #4
    Registered User
    Join Date
    03-12-2015
    Location
    India
    MS-Off Ver
    7
    Posts
    7

    Re: I'm trying to get real time data from my data-logger in a column using macros. I'm stu

    Also, I tried simply incrementing it like this

    Please Login or Register  to view this content.
    It sort-of works, but it overloads my system and the excel files stops responding. I'm not sure why that's happening.

  5. #5
    Forum Contributor
    Join Date
    06-11-2014
    MS-Off Ver
    Office 2003, 2007 & 2010
    Posts
    119

    Re: I'm trying to get real time data from my data-logger in a column using macros. I'm stu

    Sounds like you're using an older version of excel, try changing K1000000 to K65000, may be a row restriction

  6. #6
    Registered User
    Join Date
    03-12-2015
    Location
    India
    MS-Off Ver
    7
    Posts
    7

    Re: I'm trying to get real time data from my data-logger in a column using macros. I'm stu

    This worked perfectly! Thank you so much! <3

  7. #7
    Forum Contributor
    Join Date
    06-11-2014
    MS-Off Ver
    Office 2003, 2007 & 2010
    Posts
    119

    Re: I'm trying to get real time data from my data-logger in a column using macros. I'm stu

    No worries, best of luck with the prest of your project

  8. #8
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: I'm trying to get real time data from my data-logger in a column using macros. I'm stu

    The following should make the code Excel Version Independent:
    Please Login or Register  to view this content.
    Lewis

  9. #9
    Registered User
    Join Date
    03-12-2015
    Location
    India
    MS-Off Ver
    7
    Posts
    7

    Re: I'm trying to get real time data from my data-logger in a column using macros. I'm stu

    When I change K, L, M back to A, B, C it stops updating column wise and starts updating cell in the same cell again. Why is this happening?

  10. #10
    Forum Contributor
    Join Date
    06-11-2014
    MS-Off Ver
    Office 2003, 2007 & 2010
    Posts
    119

    Re: I'm trying to get real time data from my data-logger in a column using macros. I'm stu

    If you've changed your code, would be good to see the modified version before we could help

  11. #11
    Registered User
    Join Date
    03-12-2015
    Location
    India
    MS-Off Ver
    7
    Posts
    7

    Re: I'm trying to get real time data from my data-logger in a column using macros. I'm stu

    No, I haven't. It's exactly what you asked me to change

  12. #12
    Forum Contributor
    Join Date
    06-11-2014
    MS-Off Ver
    Office 2003, 2007 & 2010
    Posts
    119

    Re: I'm trying to get real time data from my data-logger in a column using macros. I'm stu

    If you are still using this:

    Please Login or Register  to view this content.
    And you've only changed these:

    Please Login or Register  to view this content.
    Then you needc to change this:

    Please Login or Register  to view this content.
    to

    Please Login or Register  to view this content.
    But as I stated, you already had data in column A so this will mess up your data, unless you've already moved it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Data Real Time
    By English Rob in forum Excel General
    Replies: 3
    Last Post: 03-13-2014, 02:47 PM
  2. Averaging Data Logger Output from Seconds to Minutes
    By Ben Mayo in forum Excel General
    Replies: 2
    Last Post: 11-14-2012, 02:34 PM
  3. macros not updating in real time on LAN
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-14-2007, 12:27 PM
  4. Real-Time Data
    By bobajob in forum Excel General
    Replies: 3
    Last Post: 11-01-2007, 03:00 PM
  5. Excel VBA macros and real time data calculations
    By caddy_shack05@yahoo.com in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-07-2005, 12:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1