Macro for NS Designer

Unregistered

Guest
U
Dear gentlemen,

Hi, a very gOod day to you all... I had trying it out but still encounter error. Hope some experts over here can advise me up what goes wrong with me. Thank you.

I encounter an error when trying to write the macro for a 'bit lamp' for the omron's touch screen. The case is like this, I would like to display the bit lamp based on the omron plc's system address bits status.

eg. I indicate the bit lamp as $B500, the system bits as SerialA:1025.00 and SerialA:1025.01. So, I would like bit lamp turn ON when both the 1025.00 AND 1025.01 address contain '1'.

The first way of writing is like this (which is working),
READCMEM($B200,[SerialA:01525.00],1);
READCMEM($B201,[SerialA:01525.01],1);
$B500=$B200 & $B201;

However, if i write directly as below and it is not working when do 'test run' on the software.
$B500=[SerialA:01525.00] & [SerialA:01525.01];

May I know where the second way of writing goes wrong? Also, is there a better way of writing this?

Very sorry for the inconvenience caused to you all over here. Hope you all don't mind to read it and give some guidelines to me. Thank you... :)
 
However, if i write directly as below and it is not working when do 'test run' on the software.
$B500=[SerialA:01525.00] & [SerialA:01525.01];

May I know where the second way of writing goes wrong? Also, is there a better way of writing this?
$B500=[SerialA:01525.00] & [SerialA:01525.01];
The use of just [SerialA:01525.00] does not cause the NS to read from the PLC. You must use the READCMEM code to bring back the value of address 01525.00 to an NS variable before you can AND it with the other variable.
 

Similar Topics

Hello, I'm new to a program EBpro and I have to find a way to make a numeric object's background change colors depending on read data from plc...
Replies
3
Views
298
Hello everyone, this is my first post. FactoryTalk View SE v.13 I have a macro defined in my project that I would like to call up when someone...
Replies
0
Views
302
Hello Guys, I have been trying to study a Machine that have Omron 3g3mv VFDs that is controlled by CJ1m CPU and SCU41-V1 communication card. The...
Replies
0
Views
474
Hello Guys, I have a packaging machine in the company that I work for that have 8 Omron VFDs (3G3MV ) that are controlled via Modbus with CJ1M...
Replies
1
Views
632
Hello there. How to transfer data from one memory area to another using macro? Data Type - Double Word Length - 4 Format - BIN Integer -...
Replies
0
Views
652
Back
Top Bottom