7/26/2012 8:45 AM | |
Posts: 8 Rating:
|
doesn't anybody want to help me?!!!!!!!!!! |
7/26/2012 9:30 AM | |
Joined: 10/7/2005 Last visit: 3/25/2025 Posts: 3042 Rating:
|
Hello sa3a of course we want to help, but it could very well be that either none of the recently active users ever had to print something in red OR that your original question perhaps lacked in detail, which made made it hard to advice you correctly. Anyhow, the general principle of what you have to do to print the whole or part of your message text in red viathe CP 340 is this: 1.) Open the CP340 PtP Paramter assignment, double click on "Control characters", adda new entry to the list of predefined ones, select an ASCII character that represents the On and Off sequence (e.g. R) and enter the red printing printer specific control characters. Note: Your printermanual should have the infoon the correct control characters to print in red, if not, please get in touch with your printer manufacturer. 2.) Define your message texts and encapsulateeverything you want printed in red inside "\R" and "\-R" (assuming you used "R" as the ASCII character that represents the red printing control character sequence), for example: \R this text will be printed in red \-R I hope this helps and you'll find additional info in the SIMATIC S7-300 PtP coupling and configuration of CP 340 manual(see especially chapter 2.7.5). |
Cheers |
|
7/28/2012 8:23 AM | |
Posts: 8 Rating:
|
thanks fritz for your answer, but it seems i did'nt explain you my problem correctly,i want give you more ditails: i have a s7 program that it print some variables with P-PRINT function, i can't access to the program writer for this reason i have to ask you.in this program,for choosing the lines that the programer wants to print red he used 4 MOVE funtion that they put some ASCII code in string DB of P-PRINT funtion, i used this way for my program but it disturb output of my program i want to learn scientifically this way,i attached some related images maybe it can help you to understand my program,plz help me
Attachmentsample.zip (146 Downloads) |
Last edited by: sa3a at: 7/28/2012 8:29 AM |
|
7/28/2012 9:46 AM | |
Joined: 10/7/2005 Last visit: 3/25/2025 Posts: 3042 Rating:
|
Hello sa3a I'm afraid that this new information doesn't help all that much either and I can only speculate here. The last two MOVE instructions are mutually exclusive and write either 48dec or 49dec into the same variable. As this is based on thestatus of M9.1 ("symbol name: "Filling not ok"), one could speculate that this is related to printing the second line in your example printout in either red or another colour. One could further speculate that this value points to a corresponding text entry in the CP340 configuration (and each text entry would have its corresponding control characters to affect the print colour). Having said that, as the two preceeding values in the String are 27dec (= "Escape" instructionin ASCII) followed by114dec (="r" character in ASCII") and since48dec and 49dec represent "0" and "1" in ASCII, it could also be a pure string based printing sequence. Based on the snippets of info that you supplied and without knowing your CP340 configuration and your Printer, it is unfortunately impossible tosay for sure. All up, the only way forward I see is for you to study the actual CP340 manual and actual CP340 Printer configuration (questions like "Does it contain a message text list or is the message text construted entirely in the S7 program?" come to mind). Following on from that, I suggest youstudy the S7 logic andconsult the printer manualto put it all into context andmake senseof it. I hope this helps and good luck |
Last edited by: fritz at: 7/28/2012 9:50 AMtypos Cheers |
|
7/28/2012 3:16 PM | |
Posts: 8 Rating:
|
Thanks fritz for your suggestion but i study many times those documentons,i know it's an incorrect request but i really don't have another way to solve my problem.if you want you can see source of the program (FC40 and FC41 are main subject of our discussion)
AttachmentTrim1-91_3_06.zip (160 Downloads) |
7/29/2012 3:34 AM | |
Joined: 10/7/2005 Last visit: 3/25/2025 Posts: 3042 Rating:
|
Hello sa3a here's what I don't understand and theanswers to these question should help you in finding out why it doesn't work: 1.) You copied this program from somewhere else where it worked correctly. What differences exist between the "original" and your version (software changes, CP340 config/setup changes, different printer etc.)? 2.) Why is FB4 "P_Print" NOT Know_How_protected (this is a Siemens standard block, have changes been made to it?) 3.) Your FB4 "P_Print" version is quite an old one, how old is the"original" program that you copied and what version of a CP340 did it use (you may need to get a newer version of FB4 for your CP340). 4.) Some of your FB4 "P_Print" related Pointer DB's Initial values differ from the offline actual values, any idea why (this may not be an issue, but you want to make sure that the actual values in the PLC are correct, have you checked them?) 5.) Have you checked the error bit and status output of FB4, and if so, evaluated what it means? 6.) Comments are lost and it seems you are at least partially usean online backup. Are you actually authorised to reuse the originalprogram or are you violating someones intellectual property (the "cracked" FB4 does worry me somehow)? Truth be told, without being physically there and being able to test your program in combination with your Printer, it is a tough call to tell you what is wrong. |
Cheers |
|
Follow us on