Panther

Logical NOT not working

6 posts in this topic

New to GX Works2 (Structured Text), and encountered an interesting puzzle that the logical NOT didn't work as expected.

Ex. NOT 0 turns out to be 0, while 1 is expected.

Kindly refer to the GX Works2 monitor screen attached, and advise what could be wrong.

Thanks for your time and help.

Not 0 is still 0.png

Share this post


Link to post
Share on other sites

[NOT] works fine in GX Works2. Is the PLC in RUN? Are you sure that the output variables (M2010, M2011, Y121, Y122) here are not used anywhere else so that they are reset later in the sequence?

1 person likes this

Share this post


Link to post
Share on other sites

Are you sure the programming is running? or in the plc ?

1 person likes this

Share this post


Link to post
Share on other sites

Thanks for your prompt help, really appreciated.

Indeed, the program is not running as pointed out.

After double checking and verify the program is running by turning on/off a physical light, it works fine.

Apologies for the silly question, how to check the program running in GX Works 2?

In fact, prior to encountering this issue, the program ran as expected (again, by the physical light).

And I did the same way (and the program is not running as pointed out by you):
Stop All Monitoring -> Build the program -> Stop the PLC (Toggle the run switch) -> Clear Memory -> Write the program  -> Toggle PLC switch to run -> Start Monitoring Again

Share this post


Link to post
Share on other sites

A download or online change of the compiled program should be enough. 
When it's a new program file you will have to download the parameter and reset the PLC as the PLC parameters have changed.

Edited by Gambit

Share this post


Link to post
Share on other sites

Noted with thanks, Gambit.

Wish you and kaare_t a nice weekend ahead!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now