Sign in to follow this  
Followers 0
dank06

CX Designer Screen Control

13 posts in this topic

Here is the flow of what I am trying to do in CX-Designer V1.0: Communication is done via RS232 on a CJ1M to NS 10 and NS 12 touch screens PLC --- (RS232 Port1)----->NS10 touch screen |--------(RS232 Port2)----->NS12 touch screen 1. Touch a 'Command' button on the NS10 to switch to a different screen 2. When the switch screen button is pressed, a 1 (TRUE) is written to a bit on the PLC. 3. A corresponding screen is displayed on the NS12 touch screen when bit (written by the NS10 touch screen) on the PLC is enabled I've tried some macro programming, but it seems to me that there must be a better way than that to complete my task. (eg, CMD button on touch screen 1 is pressed which enables a s specific screen on touch screen 2) I've looked around in the programming manual and command references, but I have yet to find a simple way to do it. Any help is greatly appreciated!

Share this post


Link to post
Share on other sites
If you attach the button to a bit in the PLC and then attach that bit to a page in the touch screens it should work OK. That is how we used to drive the old NT600S. I cannot get CX-D to run at the moment and do noit know why so cannot check it out.

Share this post


Link to post
Share on other sites
Are you just trying to keep both NS units displaying the same page number? You can set up the NS to write the internal memory location information to designated plc memory locations. I do not have the information here (at home) but do have it at work. I know that part of that information is a current screen displayed value and a screen request value. If you put a valid screen number in the screen request memory location, that screen will be displayed. Don't know if any of this helps. If you could provide a little more information it would help.

Share this post


Link to post
Share on other sites
I've done a little more research and it looks like I do need a macro to accomplish my task, but I have another problem (explained below) @BobB: I cannot do that since a Command button cannot really be associated to a bit. @gtusuport: I have to program an instructor's operating station and the student's operating station. The student should has limited access to only one screen at a time, based on what the instructor is using as a lesson. For instance, if the instructor chooses lesson A, student should have student screen A. As soon as the instructor selects lesson B (even while in session whith lesson A), student's screen should switch to student screen B. problem: I can do the above control with a macro, but it requires input on the student's screen first. For instance, my current macro (on student's screen - currently tied to a commmand button to 'begin session') is: READCMEM($W1,[SERIALB:00030],1); IF($W1==5) 'If instructor selects screen 5 on instructor station SHOWPAGE(1); 'show page 1 on student screen ELSEIF($W1==4) 'If instructor selects screen 4 on instructor station SHOWPAGE(0); 'show page 0 on student screen ENDIF; Instructor's station macro (tied to command/switch screen button - same macro tied to lesson A and B) is: WRITECMEM([SERIALA:00030],$W1,1); 'Write the screen number in $W1 to the PLC word 30 This will work, but only at project startup. When I choose lesson B for instance, as soon as I do that, the screen should switch to lesson B for the student.

Share this post


Link to post
Share on other sites
You do not need a macro. Simply write to the system memory word $SW0 within the PLC data area that you have defined in the NS Setup. Current_Screen_Number__SW0.pdf

Share this post


Link to post
Share on other sites
Um, that doesn't help too much really...are you able to explain a little clearer? Here is the procedure I would follow for the instructor's screen. For lesson A, use a Command button to switch screens .. the address to write to is $SW0 .. that will contain say '5' when I select lesson A (and '3' when I select lesson B) On student's screen what do I do for settings? /edit, i understand now, but how do i write the value to $SW0 on student's screen without student interacting with that screen? Edited by dank06

Share this post


Link to post
Share on other sites
When you setup the Screen you defined a memory address area in the PLC that will be shared between the NS and PLC. This are can be used by the PLC to directly Read/Write to/from the PLC and NS. In the attached manual sheet it shows DM1 as the starting word address. DM1 in the PLC is now the value of the first memory area $SW0 in the NS. PLC_NS_MEMORY.pdf

Share this post


Link to post
Share on other sites
Ok ... I understand now (and got it working), thanks so much for your help! :)

Share this post


Link to post
Share on other sites
ALways glad to help! Glad you understood. As a matter of considtency I always assign the first 50 Dwords D0000-0049 in my PLC projects for NS system memory data exchange. Even if I am not using all of the available system memory functions I know where they are IF I ever need them. Do the same for the system memory BITS $SB0 thru $SB52, I alway assign bits of W0000-0052 for this purpose in the PLC. A note of caution when the PLC logic changes the NS screeen using the NS $SW0 address. IF you want to change to the new screen AND prevent the operator changing to any other screen then write to $SW0 constantly. IF you want to change to the new screen ONLY but allow subsequent screen changes from the NS touchscreen then use oneshot logic in the PLC when writing to $SW0. There are numerous other system bits and words that allow you to do lots of neat things from within the PLC logic to change screens, sound buzzer etc etc on the NS.

Share this post


Link to post
Share on other sites
Thanks for the programming tip! offtopic: Is there any resource that you have come across that teaches good programming tips...or a sort of standard I can follow when programming? For instanc, in web programming, there is strict XHTML and there are certain standards that need to be met Is there something similar for PLC programming?

Share this post


Link to post
Share on other sites
Just curious, how do you or does one handle this method when using multiple networked hosts ? In a project with 6 networked hosts on ethernet I have considered mapping the memory area to the host like you describe as clearly it makes life easier, but as the chance of a host being offline is reasonable I sticked with the keeping the system memory mapped to internal NS memory. In the end the memory mapping is assigned to the fixed host right. I know one way would be to manipulate the NS system memory with SEND instructions from the hosts. Any alternatives ? Anyone using this method ?

Share this post


Link to post
Share on other sites
Not tried multiple host PLC's connected to a single NS. If the NS is setup for multiple hosts and one goes offline or fails to connect i would expect you would get an error warning popping up on the NS Screen "Failure to communicate with HOST ***" ????

Share this post


Link to post
Share on other sites
Yes you get this warning, terribly lagging the screen performance by the way. It is almost unoperable when using a sheet on all screens to display some data of all hosts. But still you would loose all functions that are handled from the host to control the NS as long as the host is offline, and there's no way to define a "backup host" or some kind.

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
Sign in to follow this  
Followers 0