HCBBS Forum (English)
Submit Chemical Projects / Find Solutions
Amplify Your Requirements on a Broader Chemical Platform *Engineering · Technology · Equipment · Solutions*
Submit Request

A question regarding the CALCU block in CS3000

2015-07-01View Original

Thread Content

This post was last edited by pe2 on 2015-7-1 21:32. If there are PV values A and B, an alarm C should be triggered when A-B is greater than or equal to 0.1. I wrote it in the CALCU block as follows: ALIAS A A.PV ALIAS B B.PV CPV=A-B IF(CPV>=0.1)THEN C.PV=1 END IF. However, with actual values of A=1.1 and B=1, CPV=0.1, and thus alarm C is not triggered; that is, it doesn’t work when the integer part is 1. I’d like to know where the problem lies
Reply #22015-07-01
You have used this IF statement incorrectly. IF(CPV>=0.1)THEN C.PV=1 ELSE C.PV=0 END IF
Reply #32015-07-01
It’s written down; ignore setting it back to 0 for now. Currently, when A=1.1 and B=1, C=1 cannot be triggered as long as both values are 1. Values like (2.1, 2) and (1.0, 0.9) work fine.
Reply #42015-07-01
Actually, it’s not a difference of 0.1; 0.1 is just used for simplicity in order to facilitate speed reduction. The actual value here is 0.012. I can change it to 0.1, 0.001, or 0.003 – those work fine. But 0.002, 0.2, 0.3, and 0.004 don’t work at all; there’s no pattern to be seen, it’s confusing
Reply #52015-07-01
Well, it turns out that when the difference is 0.012, the integer part being 1 doesn’t work; for other differences as well, there are certain integer values for the integer part that result in this not being valid. I’m not sure what’s going on

Submit a Project

**Looking for Chemical Technology, Equipment & Solutions?** No Registration Required Broader Platform Exposure | Global Chemical Service Provider Connections

Submit Request — Free Consultation

Disclaimer

This is an automated machine translation of the original thread. Some technical terms may have inaccuracies; the original text shall prevail. Click "View Original" at the top right to access the source page, which supports IP-based automatic real-time language translation. Please watch out for contact details and sales inducements to prevent fraud. All content and translations are for reference only, representing solely the poster's personal views. For enquiries, email service@hcbbs.com.