the change you have made is a change of the configuration of the PLC which has to be uploaded to take affect:
Please be aware of the network settings, which by default will change to IP of the PLC to the static 192.168.1.121
@pianz You are probably still in Simple Mode, so you cannot create the derived profile. Check out the tutorial on our knowledge base: https://kb.unipi.technology/en:sw:01-mervis:connecting-to-unipi-via-mervis-proxy-hidden
@tomas_hora I'm not sure that made any difference.
I have to do some more testing, (For some reason the IDE has been crashing on me a lot when I try to do certain things like delete outputs or function blocks.) but what I think is happening is that the correct logic is being uploaded to the PLC, but the "debug" output (e.g. when using manual mode switches) loses track of things after the update.
Exiting and restarting the Mervis IDE, it seems to come back again.
@msoenen That is because Mervis is not able to use SSL/TSL connections to the SMTP servers. As Google describes here https://support.google.com/a/answer/176600?hl=en you have to use aspmx.l.google.com server in order to be able to send the email using an unencrypted connection but using this server you can only send the mail to Gmail/Gsuite users.
@msoenen The status should be CONNECTED in the PROXY field. If you see disabled, then the configuration is not done properly. Anyway, Mervis requires the port 6677 to be allowed for outgoing connection in order to make the proxy work.
@martin-trojan I just encountered the same error:
"there is not declared any retval output for function 'testfunction'. FBD functions have to have retval explicitly declared"
After some experimentation, I just created a bool output on the right side called "retval".
It's set to "False" by default but it seems happy with True also.
Not sure how this is used in FBD, but it might be needed in ST scripts to determine if there were errors encountered while the block tried to execute. (e.g. if it returns > 0 then stop) etc.
Perhaps one of the unipi team can comment on what it is for?
Anyway - it seems to build without errors now.
hello, I found a solution to turn a digital setter into push-Button
I put a flip-flop that reset after 2 seconds the variable on which points the digital setter HMI
https://www.dropbox.com/s/dvf4toi76z35kxw/Capture d'écran 2019-01-10 09.56.36.png?dl=0
ok it works, but I was forced to delete the old variables and replace them in the program
it is a pity that there is no table with troublechoottings in which could look during malfunction but without the system does not default
This is just one possible solution, but you can use a custom ST FunctionBlock with this code (use the name "DigitalMemoryMultiplexer" if you do use it):
EXTENDS //base type
IMPLEMENTS //interface type list
previous_inp_1 := inp1;
previous_inp_2 := inp2;
previous_outp := inp1;
IF inp1 <> previous_inp_1 THEN
outp := inp1;
previous_inp_1 := inp1;
ELSIF inp2 <> previous_inp_2 THEN
outp := inp2;
previous_inp_2 := inp2;
outp := previous_outp;
previous_outp := outp;
And connect it like this:
The DO_2_01 is set as DirectSwitch Trigger and the WEB_LIGHT_BUTTON is tied to a HMI Digital Setter. Whenever you are using DirectSwitch remember to set the Debounce value on the DI sufficiently high for your input device.
Again, there are many other options for doing this, including using two HMI elements on top of each other (Digital Indicator and Digital Setter).
Here is the project file, for reference: https://www.mediafire.com/file/1o8kq9iici2qc8g/ForumProject.7z/file
Ah. Seems I just realised where I was going wrong.
I was missing the step to configure the module. Deploying the solution is not enough.
"We just changed the configuration of the PLC modules, which is not applicable by simply uploading the solution. To save the configuration, follow the UniPi - Configure Module tutorial."
The longterm persistent data will newe be stored to the PLC since the PLC storage is not designed for such purpose. So right now, you will only see the values in the graph since the load of the page. In the future, the graph widget might be able to read the data from the online DB but that's just an idea.
The tutorial on the KB is written as a step by step guide which covers all steps that need to be done in order to make it work. What do you mean by "key value pairs"? If you are getting an error when trying to login to the DB viewer and filled incorrect credentials, then there is no data yet in the database. Check in the System status while in Debug mode that there are actually data sent to the DB. Also, make sure that the Network settings are correct so that the PLC has a connection to the Internet and can resolve DNS names.
Hello @giamba ,
please do a proper screenshot of whole window, so we can see the error results. There are probably different variable types, but it is impossible to tell from the cut out.