Jump to content

HansCZ

Members
  • Posts

    35
  • Joined

  • Last visited

  • Days Won

    3

HansCZ last won the day on November 5 2023

HansCZ had the most liked content!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

HansCZ's Achievements

Advanced Member

Advanced Member (3/4)

4

Reputation

  1. Dear Pascal, I can not understand the response parameter, I would expect the response is the answer of the server. But I use "post" method, so I would expect the array has to be coded in the Content Parameters. The issue is how?
  2. Thanks a lot, I think it helps a lot.
  3. Hallo, could someone help me how to decode this query to UniLogic? I am not still sure how to add header to query. I have a smart plug from Tuya on my table and the following code works to switch it on (using postman), note I have changed the credentials a little bit. curl --location 'https://openapi.tuyaeu.com/v1.0/devices/bf330967920bfdd2abavav/commands' \ --header 'client_id: ejuqyesc739rdmnfvavvaaxh' \ --header 'access_token: ccacefd67a479c88gsfgf3a788df2e7' \ --header 'sign: 528C99FA4F6B3AD6D9BF62A930B0527dgsddfd17ACC29E6844C4AA3E543A' \ --header 't: 1733145597859' \ --header 'sign_method: HMAC-SHA256' \ --header 'Content-Type: application/json' \ --data '{ "commands": [ { "code": "switch_1", "value": true } ] }' Now how to add this to Unilogic Rest API? I see perhaps endpoint resource, then the query parameters: I thing I add a couple of keys and values like "client_id" and "ejuqyesc739rdmnfvavvaaxh" and how to add data? Will be root "commands" and first member "code", value "switch_1, second member "value" and "true" thanks jan
  4. Got it finally, thanks
  5. Dear all, I have the following issue/question. My company designs and builds water and waste water treatment plants and Unistream is our standard. Due to scope of technology, I always have a lot of pumps and valves controlled by a PLC. Therefore I have defined structures for these elements and there is a rule that each element has two basic states 1. Manual where the user can simply start or open pump or valve without any restrictions 2. Automatic where the element works according some conditions I always implement a button called "AUT" which puts all the elements to an automatic state and also a "STOP" button which puts all the elements to manual states and switch off (or close) Thus for example, the pump structure always contains in C# notation something like that struct SPump { bool InAut; bool ShouldRun; } The AUT bottons sets InAut to true; the STOP buttons sets InAut to false and also ShouldRun to false. I always draw in ladder for each element something like InAut-(S)- or InAut-(R)-ShouldRun-(R)- respectivelly for STOP button. The question is how to achieve the same effect using For Each loop. Any Idea? Thanks Jan
  6. Thanks. That is the answer. Will implementate that in the following projects. Jan
  7. Is there an option how to get size/free space of inserted SD card via UniApps or Ladder? I can't find it. Now I need to upgrade firmware via internet on US5/7-B5 and would be fine if I can check the capacity somehow before even starting upgrade. Thanks Jan
  8. @kratmel: Thx. Did so. The support says it is not possible to upgrade basic version to semi-pro I would say, thus SQL connector is not available. Recommends to use rest api and I will do it this way as it is better than MQTT for my purposes. Thanks
  9. Hello, I am facing a problem how to store data to a MariaDB database on our server. Unfortunately I have more than 40 pcs of US7-B5-T42, sou without SQL connector. Thus I have to think out something different. My idea is to use MQTT protocol, code some php broker on server and more or less convert save the incoming data to a MariaDB. The data will contain some strings, therefore I do not want to use Modbus. My questions 1. Has somebody solved this before? If so, how? Please miss unicloud 2. Is it possible to upgrade B5 to "B5 with SQL connector" additionally? thx jan
  10. Hi all, maybe have a stupid question, but do not understand. I try to define a MovingAverage function in ST: FUNCTION MovingAverage VAR_INPUT Values: ARRAY[0..4] OF DINT; NewValue: DINT; END_VAR VAR_OUTPUT Result: DINT; END_VAR VAR Sum: DINT; END_VAR (* User code starts below this comment *) FOR i := 4 TO 1 DO Values[i] := Values[i-1]; Sum := Sum + Values[i]; END_FOR; Values[0] := NewValue; Sum := Sum + NewValue; Result := Sum/5; (* User code ends above this comment *) END_FUNCTION But this does not work for me (the values are not changed. But if I use instead of "FOR TO DO" primitive def like Values[4] := Values[3]; Values[3] := Values[2]; . . etc. it works. Can somebody explain it to me? Thx. Jan
  11. Hello, I am trying to send an email with attachements (1 data table and 4 samplers). All as zipped csv. But always get an -4 (attach file) error. Note that if I erase all the attachements the email is send in a proper way, so SMTP configuration etc. is ok. I also tried to delete all the samplers and leave just Data Table and vice versa, but the error still persists. Attaching the window with attachement configuration. Using Unilogic 1.35.227 Does anybody know some link to some manual how to configure email? There is not much information in the help file and also the video tutorial is poor (the guy just says "you attach the attachement this way". Because there is a column folder, which is read only in the case of data table, but editable in the case of Sampler. Is that a folder with samplers? And how to address it? Fullpath like x:/Samples/FIC1Data or just FIC1Data? the column filename is filename of the attachement I suppose, so any. Or has to be the exact same filename where the data table is stored in PLC? But this would be weird as you are not obliged to save DT to a file? So any detailed manual to this Unistream function is greatly appreciated. thanks jan
  12. Have the similar problem. Somebody adviced this But it did not help me. I think the solution is to wait for 1.36 as in the current version there are more bugs (time schedule for instance).
  13. Tried, but during upgrade from USB disk the PLC said incompatible version or something like that. I think I have to wait to new Unilogic version. Jan
  14. Thanks, will try when in office on Monday
  15. Unilogic failed to download via ethernet. I am getting the message as attached. Using USB everything is OK and I am pretty sure I have configured U-B7-T42 and the destination is B7-T42. Unilogic version 1.35.227 Any idea?
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.