How to transfer text from SFC to graphics in compact control builder M
I am making one SFC program in compact control Builder. The front end is Compact HMI. I want to transfer different text(string data) messages to a single variable/parameter.
so as I can show different messages related to my logic in the graphics in a single data window.
I am attaching the screen shot of SFC we have made in freelance, where we are transfering different text messages to one varaible"T001_Display" based on our conditions.
If I am trying to do this, I am getting error " Expression Expected" . in compact control builder M.
Anybody please guide me in this regard.
It does not matter if you use SFC or any other program language.
Transferring Text strings between the Controller and the HMI using OPC is a *VERY BAD* idea. String handling and comparison operations in an AC800M are very inefficient. The OPC server takes a long time to update strings on the HMI. The communications load in the PLC for the OPC server to transfer strings is quite high.
Also, you cannot assign Literal Values to a string variable in an AC800M, so you cannot set a string variable like you do in freelance.
Instead, use Integer Codes in the PLC.
Compare Integer codes in the PLC logic, not strings.
Convert the Integer codes used in the PLC to strings displayed on the HMI by using a "Property Translation" aspect.
Another option is to use "Event" blocks to send a message to the HMI. So if you want to send a "Batch Completed" message for example - create an Event Block with the condition text set to "Event Completed". Trigger the event when your batch completes. Alarms and events work much better if you are sending conditional error messages and prompts to the operator because the text is sent only once when required. The OPC-AE server is much more efficient.
In some cases of course it is not possible to use integer codes - eg entering a Batch ID or Product Code. In this case, modify the default subscription rates in the OPC configuration to be 2 seconds instead of 10 seconds. Avoid using strings as much as possible.