Sign in to follow this  
Followers 0
theripley

Erroneous data @ 10 ms

8 posts in this topic

(Note: Existing set-up as shown in the picture) On a production monitoring system, an HMI is used to set-up parameters (i.e. target quantity, timing, etc.) on a monitoring board (ICON Panel). Both PLC & HMI are Mitsubishi, with the corresponding models, FX3U-32MT-ES/A & GT11 series. The monitoring board (ICON Panel) can accept only ASCII code, so the PLC program conforms to this requirement. The system was working well; however, the user wanted to change the timing from 25 sec to 25.00 sec. When the timing was changed, it was apparent that the clock is not synchronized. The timer was delayed when a 2-digit-with-2-decimal-point system is used but works well when 2-digit system. I was wondering what may have caused this error: is it the baud rate; do I need to speed it up?

Share this post


Link to post
Share on other sites
The PLC will generally only understand and integer. You will have to change the code to enter 100's of a second so the PLC will understand. It sounds like the PLC is timing 2500 seconds instead of 25.00. Regards, Garry http://www.accautomation.ca

Share this post


Link to post
Share on other sites
as a guess... nothing to do with the baud rate at all... you have now got the operator to input a real number with decimal point, the PLC might only be setup to expect an ASCII equivalent to a number and not a decimal point ... which in the case of ASCII will be a full stop character. so previously you would of had a string for 25 looking like 3235 which is a single word. where as now you have a string of 25.00 looking like 3235 2E30 30.. which is 2 and half word with a non numerical character thrown in for good measure the "." =2E... You we need to sort this out first. ALSO, I do not know how your PLC program works but you will also have to modify how 2500 will be interpreted / manipulated in your PLC Logic as well to get it to work how you wish.

Share this post


Link to post
Share on other sites
Hi Convert your Ascii 25.00 to floating point, multiply in by 100, convert to Integer then use that as the reference in a 10ms timer. Also depending on the size of your program you may not be able to convert and display that value quick enough for the HMI/ Ascii displays to keep up, maybe use the 100ms timer and 1 decimal place instead as it seems a big leap for a system that only needed 1 second accuracy to suddenly need 10ms timings.

Share this post


Link to post
Share on other sites
Looks like there was no attachment on this post. Sorry, my bad. Here is the attachment, in case it's still necessary.BROTHER (2).pdf

Share this post


Link to post
Share on other sites
THIS IS AN UPDATE. I was reading through the program and here's what I found out: 1.) (PIC_1) Numerical display (ex. D1100) on touch panel are BIN, though the display format is in Decimal. 2.) (PIC_2) The BIN data is then converted to ASCII by DSTR function (D1100 --> D400). This ASCII code is separated into byte units (D401 --> D247). 3.) (PIC_3) This is the RS communication instruction that has got me confuse. The read address of send data is D40 - D79 (K39), while receive data is not being used. However, I cannot find any instruction linking D247 to D40, which keeps me wondering how did the data from D247 was sent to the ICON panel. 4.) (PIC_4) This is another confusing part. How did the data sending switches from Icon panel no. 1 & no.2? Please help me. PIC_1.pdf PIC_2.pdf PIC_3.pdf PIC_4.pdf

Share this post


Link to post
Share on other sites
so we have: 1. timer preset is entered through HMI 2. this value is used by PLC timer 3. timer value (either preset or accumulated) is displayed on some big panel connected through RS232 based on your initial problem description, issue is that duration of timer is incorrect. this is first of two problems and it has nothing to do with RS232 communication with big display (at this stage that is merely cosmetics, has no effect on actual timing). next issue is displaying correct value on the display. and this is simply formatting of the ASCII string. you have already received valid tips (baud rate has nothing to do with either of two issues, how to adjust timer preset etc.). also your timer need to be high speed timer to use 10ms resolution. typically there are only few such timers on PLC, read manual for your PLC for more info.

Share this post


Link to post
Share on other sites
Follow-up question: How will I be able to enter 25.3 to PLC? Say, I entered a value of 25.3 thru HMI, I wanted that real value to be on the PLC. > If my numerical display on HMI has a data type of BIN with 2 decimal value, 25.3 will be 253. > If my numerical display on HMI has data type of Real, 25.3 will be 26214. What is 26214? Please help.

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