plc timer to excel

cybernut39

Member
Join Date
Sep 2003
Posts
2
Hi I would like to know how to see the time of a plc timer in excel (not the en or dn bits but the auctual time of the timer) I already have excel linked to my plc, I just need to know what to put in excel to see this timer. I run 16 miles of conveyor system and Im trying to find out the down time of a certain section of conveyor, with out having to open the plc program each time. Thanks for any help also if you could reply to my email [email protected] thanks again
 
you are not saying what plc you have. since you mention
en and dn bits it looks like it's one of the ab plcs.
what you are looking for is accumulator value of the timer
such as t4:0.acc
 
Configure a new Topic in RSLinx, and as panic mode stated use 'T4:0.ACC' as its address. This is then added to excel using the 'paste special' command. You should then see the dynamic value of Timer 0 increment when T4:0 is true. You also need to specify node address of the particular PLC if on a network (if i remember correctly).
 
excel VB

The following macro writes a value to N7:0 in a PLC-5 using the RSLinx topic, testsol: This routine will write a word from Excel file RSLINXXL.XLS, DDE_Sheet tab, cell D7:

Sub Word_Write()

'open dde link: testsol=DDE Topic

RSIchan = DDEInitiate("RSLinx", "testsol")

'write data thru channel

DDEPoke RSIchan, "N7:30", Range("[RSLINXXL.XLS]DDE_Sheet!D7")

'close dde channel

DDETerminate (RSIchan)


End Sub
 
rtq

Berni.

I think cybernut39 wants to READ a value. I really don't know much about vb script, but could your script be modified with DDEPEEK rather than DDEPOKE?

TKS

Thomas
 
curiosity killed ...

I played with it for a while longer and came up with:

Sub Timer_Read()

'open dde link: project_name=DDE Topic

RSIchan = DDEInitiate("RSLinx", "project_name")

'read data thru channel

data1= DDERequest(RSIchan, "T4:0.ACC")

'close dde channel

DDETerminate (RSIchan)

'write values to cells
Range("A1") = data1

End Sub
 
Now, now, Berni, I've seen you asking questions that could be answered by a help file too. If nobody asked questions there wouldn't be a forum.........
 
to vet

Hey vet, i asked a question on NETDDE and not DDE.
write with a NETDDE is not in help file.
 
OK then........ So......... Ummmmmmm.......

What part of Quebec are you from?


Here's a little info I found for everyone:

Q: What is the difference between DDE and NetDDE?

A: DDE and NetDDE are quite different technologies. DDE is the first crack at IPC offered by Microsoft when they decided that their OS was "multi-tasking". The intent was simple transmission of (name,value) pairs, and it was implemented in as simple a manner as they thought possible. It is well established and robust, once you figure out how to implement it correctly. NetDDE is an extension created by Wonderware, the makers of InTouch. It is an attempt to extend the DDE semantics to the network. It does indeed show real problems with more than a few nodes, and everybody who has tried to use it is aware of this.

We don't use NetDDE (the Wonderware mechanism). It is not reliable. We use local DDE (the Microsoft mechanism), which is reliable. The networking portion of our Cascade Connect connection is done using TCP/IP. We carefully handle timeouts, breaks, re-connections, multiple connections, multiple QNX hosts, etc. at the TCP level. Once the message is on the Windows box, it is converted to local (reliable) DDE where it can be transmitted to DDE-aware local processes.

To recap, NetDDE is unreliable. Don't use it. Don't confuse it with DDE either. DDE is old, but it is reliable, fast, and ubiquitous. Given that many programs offer no alternative interface, DDE can be the only viable choice for many applications. Even those programs that do offer an alternative interface usually also offer DDE.
 
Last edited:

Similar Topics

Hi, I am attempting to turn on an output for one second, every thirty seconds, but am having some trouble. I have a XIC with S:1/15 (first pass)...
Replies
9
Views
583
Hi! i'm just wondering did there is any chance to change Set Time(TV) on Siemens plc timer without step 7 using c# or python if timer not set in...
Replies
1
Views
1,243
Hi there I'm guessing this is a straightforward one but after much experimenting I've been unable to find an answer. The software is TIA V16...
Replies
5
Views
2,319
Our old Omron X20K PLC has the following ladder timer code. TIM 000 #0030 Is this 30 seconds, or 3 seconds? or 0.3 seconds?
Replies
1
Views
1,060
Hello how to move a new value to a timer preset PT, if possible? which of the timer parameter is , the timer current value? thanks
Replies
4
Views
2,055
Back
Top Bottom