Another CLX to Excel/VBA question

ntommyb

Member
Join Date
Jan 2005
Location
MBUSI in Vance, Al
Posts
16
I've seen a bunch of these while searching but none address what I'm trying to do. I'm just trying to learn how this works, I've done some transfering of data to spreadsheets for displaying and a few buttons through VBA that write to the data table but thats really about it.

Heres an example

Private Sub CommandButton1_Click()
RSIchan = DDEInitiate("RSLinx", Range("Sheet1!F4"))
DDEPoke RSIchan, Range("Sheet1!F15"), Range("Sheet1!A2")
DDETerminate (RSIchan)
End Sub


Sheet1!F4 is my OPC topic in the Spreadsheet cell

Sheet1!F15 is a listbox that allows me to select the bit to toggle.

Sheet1!A2 is a 1 in a cell to push the value to the data table

Problem

I'd like to use something else that pushs a 1 while the button is depressed and pushs a 0 when it releases

Problem 2

I'd also like to display the result in a textbox but it keeps displaying whatever I type in instead of treating it like a link, for example

Private Sub TextBox2_Change()

TextBox2.Text = ("=RSLINX|DMONTOPIC!'_000PLC01.iDiagnostic2,L1,C1'")

End Sub

just displays
("=RSLINX|DMONTOPIC!'_000PLC01.iDiagnostic2,L1,C1'")

If anyone has an answer, it would at least give me somewhere to start. Also I'm interested in learning this so if you could explain it a bit instead of just solving my problem that'd be great.

We have standard logic at the plant I'm working at and I'm trying to set up a manual function utility that's flexable and lean enough to just take to any line and just set the OPC topic in the excel spread sheet instead of using the underdeveloped clunky RSView interface they use here
 
I believe that the reason you don't see the data is that the DDE link won't work in a text box control. The DDE link needs to be in a cell. If you see the data changing in the cell, then write a routine tied to a timer and copy the value of the data in the cell to the list box.
 

Similar Topics

Well I am trying to cleanly convert a decimal value in a DINT to the corresponding bit in a different DINT So if I have the number 11 on in...
Replies
11
Views
2,006
I have a four slot chassis: 0) 1756-L61 1) 1756-ENBT 2) 1756-DHRIO 3) Empty I'm going to install a 1756-EN2T in Slot 3, move all my I/O over to...
Replies
1
Views
1,475
Hi, Does anybody know what's the equivalent Local IO Extension Module of PLC-5 series (1771-ALX) into CLX (1756 series)? Does the 1756 series...
Replies
11
Views
4,938
I have 2 PLCs. One is networked to our plant, and the other is networked to the first PLC via a 1756-EN2T. I could easily get the second PLC...
Replies
3
Views
58
Hi, The hardware is: Click Plc model # CO-O1DD1-O HMI model # S3ML-R magnetic-inductive flow meter model # FMM100-1001. I will set the flow meter...
Replies
4
Views
180
Back
Top Bottom