Sign in to follow this  
Followers 0
j.brophy@corkillsystems

cp1l serial port setup in logic

8 posts in this topic

hi there i have a problem where i cant manage to get the stup function to change my serial port setup. i have asked this question before but are really not sure how to assemble the correct words to get what i want. I have written a program that moves the values into data memory associated with the serial port on my cp1l plc and then run the stup function but cant seem to get it to work. i am really not sure i am putting the correct words into the data memory which i think is the problem. if i wish to get the serial port setup up as 38400, master, pc link, what do i put into the data memory area as words with the move functions? if i wish to get the serial port setup up as 38400, slave, pc link, unit 1, what do i put into the data memory area as words with the move functions?

Share this post


Link to post
Share on other sites
Hello This FB should do what you want. It automatically sets the Port 2 settings as shown in the two Settings dialogs pictures. Never used PC link, so no idea if this is all the settings or not. Select master OR (slave AND address) and toggle the change flag on the FB input parameters. Cheers, Pp PcLinkSetup.zip Edited by ParaffinPower

Share this post


Link to post
Share on other sites
Pp, In your FB, you are setting the 1st word to #0008. This makes sense, as the 1st word is the baud rate, and 38400 is the 8th selection in the list. I thought that this may of been the case, but could not find any reference that confirmed it, and did not have any hardware to test. Is the setup parameters documented somewhere?

Share this post


Link to post
Share on other sites
Truth be known, the manual is wrong (or lacking, at the very least) here, as it states either 38k4 or 115k2 whereas I found, as you have, that any baud rate can be selected. Trial and error - what else?

Share this post


Link to post
Share on other sites
hi there, I have set up the program on first scan flag and input combinations to move values to dm0 to dm0+9 depending on the node i wish to select in the pc link chain as it saves me having to have several different programs for automation of a cow shed. basically upon power up hold inputs to select the the node and the part of the program specific to the node selected. It will save me sending out an incorectly programed plc as they can switch it on site to suit as we will send these all over the country. I have noticed that there are errors in the manual in reguards to the connection to the pc link wiring for a 485 com board option between plc's and have figured that out by trial and error. I think there may be errors in what i have to write in to dm0 to 9 and that may be what my problem is or i have put in something wrong. I can get it to work by using the above and setting the serial setup in the settings menu but thats not what i am trying to do. In the manual w462-e1-02+cp1l+oper manual in appendix g pages 614, 615 and 619 it has all the settings i need to setup node transmission rates etc... so bits 0 to 7 set the serial transmission speed 0 to 0A hex depending on speed so bits 0 to 3 set the node number 0 to 7 hex depending on node so bits 4 to 7 set the link words 0 to A hex depending on amont of words so bits 8 to 11 set the mode of communication 0 to 8 hex depending on the communication mode so bit 15 sets up the mode 0 or 1 depending on mode so the above is only one word correct 15 bits? so i only need one move function. as far as i can see in the table the values over lap and i dont have a clue what is going on.

Share this post


Link to post
Share on other sites
hi there i can not open up the document attached above as it is a cxf and is not a supported file type in my cx programmer 8.01 for got to mention.

Share this post


Link to post
Share on other sites
Could you post where these errors are, so that they can be corrected, and that others will become aware. Based on these settings, if makes what PP posted incorrect for this application. The 2nd shot shows the settings if using Serial Gateway, or any other mode that uses all of the available Baud Rate settings. Edited by lostcontrol

Share this post


Link to post
Share on other sites
Hi, CXF extention is for a Function Block. This is supported in V8 but you load into your project using File->Function Block->Load FB from file Hope that helps, Bertie

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