PDA

View Full Version : CR0452 Calculations



pkennedy
11-28-2016, 04:36 PM
I would like to have variables switch between metric and imperial values, there is approximately 10 values that will need to switch between metric and imperial. It seems if I try to perform the conversion on the CR0452 display it becomes very laggy. I'm using this display with a CR0401, would it be better to have the conversion happen on the control vs the display?

Erik Gerrits
11-29-2016, 09:48 AM
Not sure what you mean by laggy.

I have done this on quite a few projects.

I have the conversion done in the code of the display:

stValue := SEL(xMetric, nImprerialTemp, F_TO_C(nImperialTemp));

stValue is a string that is put on the visualization. F_TO_C is a function that has the math to covert from imperial to metric temp.

pkennedy
11-29-2016, 10:20 AM
I have 3 screens, screen one shows 5 data values (Press, Temp, Flow Rate, Total Flow, Tank Level), screen 2 shows (Pressure, Temperature, HP, RPM and Tank level) screen 3 shows all 9 values. When I try to cycle through pages it takes 3-7 seconds to change some times it doesn't even change pages.

Also the display will run into an error stop the program and flash a red 10 Hz LED.

This only happens when I'm connect to a CR0232 controller, when the display isn't connected the pages cycle with no issue.

I then started with a new template and have started to build up the program again and I noticed my issue was happening when I tried to run the conversions for the 8 data values. Which consisted of changing int_to_real times by the conversion factor and then setting the precision using this function: http://mobilecontrols.ifmefector.com/showthread.php?t=133

I normally deal with a CR0232 or CR0032 and CR1081 so this is the first time I've dealt with a CR0452 and CR0401 and I'm unsure of their capabilities.

Erik Gerrits
11-29-2016, 10:23 AM
Do you have a lot of bitmaps on the pages? Also what is the busload? What is the PLC cycle times?

pkennedy
11-29-2016, 11:12 AM
I don't have any bitmaps only elements, all rectangles and the most is 37. I have it set for 250 and the cycle time were 45000 usec - 52000 usec before connecting to the controller, I didn't have enough time to view the cycle time after connecting the controller as the program would error out.

After connecting the controller cycle time jump to 79000usec - 85000usec.