Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Instantaneous cell values from a PLC
I am running excell 2003 and have an analog input value from an Allen Bradley
control logix PLC giving a cell an instantaneous value of the input, I was wondering if there was a way of saving the values in that cell, so I can set up a trend of the values.I have tried to send the values to another spreadsheet on a time basis, but have had no luck. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Instantaneous cell values from a PLC
Code goes in the sheet module. Name a blank sheet in the same workbook "LogSheet". Change C5 to the correct cell. Private Sub Worksheet_Change(ByVal Target As Range) If Target(1, 1).Address = "$C$5" Then With Worksheets("LogSheet") .Cells(.Rows.Count, 1).End(xlUp)(2, 1).Value = Target(1, 1).Value End With End If End Sub -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Bill" wrote in message I am running excell 2003 and have an analog input value from an Allen Bradley control logix PLC giving a cell an instantaneous value of the input, I was wondering if there was a way of saving the values in that cell, so I can set up a trend of the values.I have tried to send the values to another spreadsheet on a time basis, but have had no luck. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Instantaneous cell values from a PLC
I have installed the code in the Sheet1 Objects, and still I have no tag
values comming up in the LogSheet, is there a setting or something that may be preventing vba from moving the changing value? "Jim Cone" wrote: Code goes in the sheet module. Name a blank sheet in the same workbook "LogSheet". Change C5 to the correct cell. Private Sub Worksheet_Change(ByVal Target As Range) If Target(1, 1).Address = "$C$5" Then With Worksheets("LogSheet") .Cells(.Rows.Count, 1).End(xlUp)(2, 1).Value = Target(1, 1).Value End With End If End Sub -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Bill" wrote in message I am running excell 2003 and have an analog input value from an Allen Bradley control logix PLC giving a cell an instantaneous value of the input, I was wondering if there was a way of saving the values in that cell, so I can set up a trend of the values.I have tried to send the values to another spreadsheet on a time basis, but have had no luck. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Instantaneous cell values from a PLC
Change the cell designation in the code to another cell; enter some data in that cell; see if the change is logged. ( the dollar signs($) are required in the cell address) If not, run this sub and try again... Sub MakeItRight Application.EnableEvents = True End Sub -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Bill" wrote in message I have installed the code in the Sheet1 Objects, and still I have no tag values comming up in the LogSheet, is there a setting or something that may be preventing vba from moving the changing value? "Jim Cone" wrote: Code goes in the sheet module. Name a blank sheet in the same workbook "LogSheet". Change C5 to the correct cell. Private Sub Worksheet_Change(ByVal Target As Range) If Target(1, 1).Address = "$C$5" Then With Worksheets("LogSheet") .Cells(.Rows.Count, 1).End(xlUp)(2, 1).Value = Target(1, 1).Value End With End If End Sub -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Bill" wrote in message I am running excell 2003 and have an analog input value from an Allen Bradley control logix PLC giving a cell an instantaneous value of the input, I was wondering if there was a way of saving the values in that cell, so I can set up a trend of the values.I have tried to send the values to another spreadsheet on a time basis, but have had no luck. |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Instantaneous cell values from a PLC
If that's a DDE link, the Worksheet_Change event may not fire. To overcome
this, put a formula in another cell that links to the DDE-linked cell (just =$C$5 will do), then put the code into the Worksheet_Calculate event procedure. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Jim Cone" wrote in message ... Code goes in the sheet module. Name a blank sheet in the same workbook "LogSheet". Change C5 to the correct cell. Private Sub Worksheet_Change(ByVal Target As Range) If Target(1, 1).Address = "$C$5" Then With Worksheets("LogSheet") .Cells(.Rows.Count, 1).End(xlUp)(2, 1).Value = Target(1, 1).Value End With End If End Sub -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Bill" wrote in message I am running excell 2003 and have an analog input value from an Allen Bradley control logix PLC giving a cell an instantaneous value of the input, I was wondering if there was a way of saving the values in that cell, so I can set up a trend of the values.I have tried to send the values to another spreadsheet on a time basis, but have had no luck. |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Instantaneous cell values from a PLC
I still cannot get Excel to run the procedure, security settings are fine,
still will not give me the values. "Jon Peltier" wrote: If that's a DDE link, the Worksheet_Change event may not fire. To overcome this, put a formula in another cell that links to the DDE-linked cell (just =$C$5 will do), then put the code into the Worksheet_Calculate event procedure. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Jim Cone" wrote in message ... Code goes in the sheet module. Name a blank sheet in the same workbook "LogSheet". Change C5 to the correct cell. Private Sub Worksheet_Change(ByVal Target As Range) If Target(1, 1).Address = "$C$5" Then With Worksheets("LogSheet") .Cells(.Rows.Count, 1).End(xlUp)(2, 1).Value = Target(1, 1).Value End With End If End Sub -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Bill" wrote in message I am running excell 2003 and have an analog input value from an Allen Bradley control logix PLC giving a cell an instantaneous value of the input, I was wondering if there was a way of saving the values in that cell, so I can set up a trend of the values.I have tried to send the values to another spreadsheet on a time basis, but have had no luck. |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
Instantaneous cell values from a PLC
Show your code, and tell us where you've placed it.
- Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Bill" wrote in message ... I still cannot get Excel to run the procedure, security settings are fine, still will not give me the values. "Jon Peltier" wrote: If that's a DDE link, the Worksheet_Change event may not fire. To overcome this, put a formula in another cell that links to the DDE-linked cell (just =$C$5 will do), then put the code into the Worksheet_Calculate event procedure. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Jim Cone" wrote in message ... Code goes in the sheet module. Name a blank sheet in the same workbook "LogSheet". Change C5 to the correct cell. Private Sub Worksheet_Change(ByVal Target As Range) If Target(1, 1).Address = "$C$5" Then With Worksheets("LogSheet") .Cells(.Rows.Count, 1).End(xlUp)(2, 1).Value = Target(1, 1).Value End With End If End Sub -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Bill" wrote in message I am running excell 2003 and have an analog input value from an Allen Bradley control logix PLC giving a cell an instantaneous value of the input, I was wondering if there was a way of saving the values in that cell, so I can set up a trend of the values.I have tried to send the values to another spreadsheet on a time basis, but have had no luck. |
#8
Posted to microsoft.public.excel.misc
|
|||
|
|||
Instantaneous cell values from a PLC
Have placed it in this workbook procedure
Private Sub Worksheet_Change(ByVal Target As Range) If Target(1, 1).Address = "$A$1" Then With Worksheets("LogSheet") .Cells(.Rows.Count, 1).End(xlUp)(2, 1).Value = Target(1, 1).Value End With End If End Sub "Jon Peltier" wrote: Show your code, and tell us where you've placed it. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Bill" wrote in message ... I still cannot get Excel to run the procedure, security settings are fine, still will not give me the values. "Jon Peltier" wrote: If that's a DDE link, the Worksheet_Change event may not fire. To overcome this, put a formula in another cell that links to the DDE-linked cell (just =$C$5 will do), then put the code into the Worksheet_Calculate event procedure. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Jim Cone" wrote in message ... Code goes in the sheet module. Name a blank sheet in the same workbook "LogSheet". Change C5 to the correct cell. Private Sub Worksheet_Change(ByVal Target As Range) If Target(1, 1).Address = "$C$5" Then With Worksheets("LogSheet") .Cells(.Rows.Count, 1).End(xlUp)(2, 1).Value = Target(1, 1).Value End With End If End Sub -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Bill" wrote in message I am running excell 2003 and have an analog input value from an Allen Bradley control logix PLC giving a cell an instantaneous value of the input, I was wondering if there was a way of saving the values in that cell, so I can set up a trend of the values.I have tried to send the values to another spreadsheet on a time basis, but have had no luck. |
#9
Posted to microsoft.public.excel.misc
|
|||
|
|||
Instantaneous cell values from a PLC
I said that a _Change event might not fire, so you should use a _Calculate
event procedure. See my earlier post (5/9/07 8:41 am). - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Bill" wrote in message ... Have placed it in this workbook procedure Private Sub Worksheet_Change(ByVal Target As Range) If Target(1, 1).Address = "$A$1" Then With Worksheets("LogSheet") .Cells(.Rows.Count, 1).End(xlUp)(2, 1).Value = Target(1, 1).Value End With End If End Sub "Jon Peltier" wrote: Show your code, and tell us where you've placed it. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Bill" wrote in message ... I still cannot get Excel to run the procedure, security settings are fine, still will not give me the values. "Jon Peltier" wrote: If that's a DDE link, the Worksheet_Change event may not fire. To overcome this, put a formula in another cell that links to the DDE-linked cell (just =$C$5 will do), then put the code into the Worksheet_Calculate event procedure. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Jim Cone" wrote in message ... Code goes in the sheet module. Name a blank sheet in the same workbook "LogSheet". Change C5 to the correct cell. Private Sub Worksheet_Change(ByVal Target As Range) If Target(1, 1).Address = "$C$5" Then With Worksheets("LogSheet") .Cells(.Rows.Count, 1).End(xlUp)(2, 1).Value = Target(1, 1).Value End With End If End Sub -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Bill" wrote in message I am running excell 2003 and have an analog input value from an Allen Bradley control logix PLC giving a cell an instantaneous value of the input, I was wondering if there was a way of saving the values in that cell, so I can set up a trend of the values.I have tried to send the values to another spreadsheet on a time basis, but have had no luck. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I calculate instantaneous rate of change in excel? | Excel Discussion (Misc queries) | |||
Replacing Linked Cell Values w/ Current Values | Excel Worksheet Functions | |||
instantaneous cell value | New Users to Excel | |||
vlookup, multiple values, sum values into one cell?? | Excel Worksheet Functions | |||
a unique cell value returns multiple cell values from another shee | Excel Worksheet Functions |