Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using Hyperlinked RSLINX Values in Script
I have an application where I trap Allen Bradley PLC5 registers when machine faults using hyperlinks to a Excel spreadsheet. I have this PL networked to my PC using RSLINX. I am able to look at only the las occurrence. I would like to save the Excel spreadsheet for eac occurrence. So far I have been able to hyperlink the PLC register into the Exce spreadsheet and have been able to break this info down into bits usin Excel commands. I would like to automate this process using scrip programming that looks at a single register in the PLC, N12:154, and i this register is not zero, archive the fault spreadsheet as: Fault(number from N12:154) YYYYMMDDHHmmss.XLS I have already figured out how to extract the date stamp informatio using script commands. The fault file will automatically point out what caused the specifi fault with a section for each specific fault number. This will hel tremendously help mechanics in troubleshooting problems with thi complicated machine. The problem that I currently have is that when I try to extract th fault register information hyperlinked to cell “M1” from m spreadsheet, “Get Fault Value.XLS”, I get an error “Type Mismatch” This is for the command CstrFaultNumber = objSheet.Range(“M1”).Value This command works fine for any numeric or text cell, but I get thi error for the hyperlinked cell, which has in it {=RSLINX|KONICA!`N12:154,L1,C1`} I have tried to use the script hyperlink command setting CstrFaultNumber = {RSLINX|KONICA!`N12:154,L1,C1`} But this hangs up on the : (colon) character. All the examples I fin use the word HYPERLINK in this command. I have tried that and i doesn’t work. Unfortunately all my searching on the network has no turned up anything specific on how to use this hyperlinked informatio from an Allen Bradley PLC5. I get it into Excel by using the “inser hyperlink” hotkey and the clicking on the cell in a live RSLINX table The Excel spreadsheet works fine. I would just like to write a progra to save the fault file when it happens for troubleshooting purposes The register N12:154 goes back to zero when the fault is cleared. Th fault must be cleared for the machine to go on working. If anothe fault happens the trap registers in the PLC are overwritten, prio fault information is lost, so I would like to save this file each tim a fault occurs. I would have my script program looping and triggerin off N12:154 not equaling zero and save all faults traps when the occur. Any suggestions -- jtgoodma ----------------------------------------------------------------------- jtgoodman's Profile: http://www.excelforum.com/member.php...fo&userid=3268 View this thread: http://www.excelforum.com/showthread.php?threadid=52495 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Lookup returns hyperlinked values as normal text | Excel Discussion (Misc queries) | |||
Merging a hyperlinked cell with a non-hyperlinked cell? | Excel Discussion (Misc queries) | |||
How to get in a vbs script the sum of values of a Excel cells in a certain range? | Excel Discussion (Misc queries) | |||
Capturing timed Data with RSLinx | Excel Programming | |||
Excel macro script to copy only formulas and not values from one sheet to another | Excel Programming |