Sign in to follow this  
Followers 0
Zoran Mihajlovic

HBM Weight modul on SCU

7 posts in this topic

Hallo, As I posted before to you, I use'd HBM on CQM1H RS232 port. For some time I didn't use HBM, and now I need to conect HBM WE2108 to CJ1M-CPU13 PLC with SCU41 card. Link is on port 2 as RS232 . I have problem with reading value (MSV), it send ok (I think) but receave is not good. COD and TARA is executing, so cabel and other is OK. Wher is mastake? HBM.zip Edited by Zoran Mihajlovic

Share this post


Link to post
Share on other sites
If you are using CX-Protocol then run a continuous trace on the SCU port. While online open the "IO Table and Unit Setup", select the SCU-41 in the Main Rack, "Start Special Application" and "Start with Settings Inherited". This will open CX-Protocol. Go online to the SCU and run a trace on Port2. Upload the trace and this should quickly help you pinpoint the communication problem. If you are not using CX protocol then you might try using the CJ Data Trace function to monitor your data. Not quite as easy or detailed as CX-Protocol but it may help. http://forums.mrplc.com/index.php?autocom=downloads&showfile=663 Took a quick look at you application and see that indeed you are using CX-Protocol. USE THE DATA TRACE FUNCTION - It is really helpful. Edited by BITS N BYTES

Share this post


Link to post
Share on other sites
Hi Zoran, looked at your CX-Protocol data traces and note that the first variable in your MSV_COF91 receive message is defined as &(W(CIO 0250),8) + ",". This requires that there MUST be eight characters prior to the ",". If not then the receive message will abort. In your receive traces there appear to be 9 characters before the ",". I think this is why you are not getting the data. Either change &(W(CIO 0250),8) to &(W(CIO 0250),9) or if the data length can vary use the wildcard &(W(CIO 0250),*) or if the first reponse character is alays a "." then "." + &(W(CIO 0250),8) + "," should do the trick. Hope this helps - let me know?

Share this post


Link to post
Share on other sites
U can all so try to turn off control on your protocols, im not expert but that may help.

Share this post


Link to post
Share on other sites
Thanks, B&B I will test as you say , and let you now the resalt.

Share this post


Link to post
Share on other sites
Wild car do everithig , it receive 12 byts in ASCII format. Thank's to you!

Share this post


Link to post
Share on other sites
Glad to help. I have been working on a lot of protocol macros on a recent project. Converting incoming string data to useable data in the PLC can be difficult to understand. The latest PLC platfroms and CX-Programmer allow string manipulation directly inside Function blocks. This is a really great way of handling/intepreting/sorting data. DO IT IF YOU CAN - Saves a lot of time. Attached is your original program with a simple String Conversion FB. This converts the incoming string data from your CX-Protocol at CIO 0250 from STRING to UINT and places the integer in any desired location. In the example it is placed in D0000. Conversion Rules:- String data must be numbers 0 thru 9. If you receive data like "a123" or "789w" conversion will not work and function block returns D0000=0 . If you receive 0000000000005, or 05 or 5 the value will be converted to UINT 5. If the string length OR value exceeds the maximum of an UINT then D0000=0. Have Fun and Good Luck. HBM_V2.zip

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