I have a bunch of Excel 4 Macros that I converted to Excel 2000. These macros request PLC data through Wonderware's Modbus Plus I/O server, version 7,1,0,0. These macros worked well with an earlier Wonderware version and Modbus Plus I/O server version 4. Now I know I should be converting these to VBA and will eventually. Wonderware (InTouch ver 7.1) works fine with the I/O server and I can get data directly to a spreadsheet using the formula: =MBPLUS|'PLC1'!40100. However I'm looking at a lot of registers over many PLC's and hope I can make the existing macros work for now. The existing macros are as follows:
=ERROR(FALSE)
=APP.MOVE(0,768)
Channel=INTIATE("MBPLUS","PLC1")
L6TStamp=REQUEST(Channel,"40100")
L6Stops=REQUEST(Channel,"40101")
L6Prod=REQUEST(Channel,"40102")
etc...
etc...
=TERMINATE(Channel)
=RETURN()
Then there is another macro,that opens a spreadsheet and pastes the data and inserts a new row. That one works fine but I'm not getting any new data. When I step into the macro it gets stuck at the first REQUEST line. Since everything else works I'm assuming there is a problem with the syntax but I'm not really sure because when I set the MBPLUS server to NetDDE it doestn't get stuck at rhe REQUEST lines but I'm still not getting any data. Anybody have any ideas on this?
=ERROR(FALSE)
=APP.MOVE(0,768)
Channel=INTIATE("MBPLUS","PLC1")
L6TStamp=REQUEST(Channel,"40100")
L6Stops=REQUEST(Channel,"40101")
L6Prod=REQUEST(Channel,"40102")
etc...
etc...
=TERMINATE(Channel)
=RETURN()
Then there is another macro,that opens a spreadsheet and pastes the data and inserts a new row. That one works fine but I'm not getting any new data. When I step into the macro it gets stuck at the first REQUEST line. Since everything else works I'm assuming there is a problem with the syntax but I'm not really sure because when I set the MBPLUS server to NetDDE it doestn't get stuck at rhe REQUEST lines but I'm still not getting any data. Anybody have any ideas on this?