Panasonic Home Business > Industrial Devices > Automation Controls Top > Service & Support > Frequently Asked Questions

How do I switch PLC contacts during execution of a PLC macro?

ID:
854
Issued:
Dec 28th, 2009
Updated:
May 17th, 2013

How do I switch PLC contacts during execution of a PLC macro?

ANSWER

To explain this, let’s assume that the name of the spreadsheet is "TEST" and that we want to switch bit 0 the PLC internal relay R on.

1. In the spreadsheet "TEST", set the PCWAY cell data setting to set R0 of WRITE mode. In this example, we will allocate the cell data setting to cell A1 (regarding allocation cell position, a cell position that hides the cell as much as possible is best).

2. Input 1 to cell "A1" (input 0 to switch off).

3. Insert the following Macro in the Macro that you want to turn R0 on.


Macro name()

DIM A$ AS String

Declaration of the save area for the sheet name being


A$ = ActiveSheet.Name

Represent the sheet name being displayed
Application.
screenUpdating = FALSE
Stop the Excel display
Sheets("TEST").Select Switch to TEST
Call Application.Run
("PCWAYsubAutoSheet")
Notify PCWAY that the spreadsheet is switched.
Range("A1").Select Move the cursor to A1
Call Application.Run
("PCWAYsubDownLoad")
Set R0 on
Sheets(A$).Select Return to the original she
RELATED CATEGORIES

Did you solve your problems?

YES

NO

Search Keywords


If you still have problems with our products,

FEEL FREE TO CONTACT US

Return to top