Problem with implements DES and MD5 into ACF800F
Hi Everybody.
I try to implements DES and MD5 algorithm using ST and FBD ( using user control block). I have problem with hardware limitations. I wrote implements MD5 and DES (encryption) but emulator can't running (limitation) Can somebody help me (I can download project with code IF someone offers help)
Can I change settings emulator or sth like that to execute code?
I can pay for help.
Voted best answer
Hi,
Yes, you can try changing emulator boot configuration memory setting, max no of objects you can set 65000 and memory you can set 8000. But just by setting max numbers problem will not get solved, you need to run thru trial and error in balancing/adjusting between max objects and memory value. it's bit tricky I am not sure what and how is relation between this two things.
btw thanks for your question, I never knew about DES and MD5 before, thanks to google I got info about this encryption/decryption code/algorithm. I am wondering how that compelx code can be written using ST and FBD using IEC 61131-3 language ?
Coming back to your question again, do you get any error message while plausibility check ? if not any warning/popup message upon downloading ? this information will help in solving problem.
Also I understood while google on this topic that execution of code is dependent on RAM size and speed as well as execution cycle time. So try to execute this in real HW if you have one.
Good luck !
Answers
When I change settings emulator like this:
Program can not load. When I commising project and try load program to emulator window with information that I have to waiting to load program is still displayed.
When I try run emulator using default settings I see this:
I do not know what is the cause of such a message.
Hello,
Tracing back to not executable error message, is because of illegal array indexing, probably in UFB des in FUN(P-FB). Check image attached here with in finding doc file.
bytheway csv project back up you had shared was not compiled one, there were few error and was not plausibility passed. as well I am not sure why you are using task in PLC mode ? recommended to use Task Task other then PLC mode task. And then I was able to load project to emulator with default memory settings. So it's not issue with memory limits. So check with array indexing in highlighted function blocks. should help in solving issue. attached here with modified project backup .csv
hello,
Regarding your last comment to previous answer, you need to convert DWORD into DINT and then ADD. you get value you want. I tried this way check image below
FBD logic can be written in ST this way, vdint := TO_DI(W1) + TO_DI(W2);
Hope this helps in getting what you want.
Ok. It's work. I have next question. I have to send my encrypted data (using DES) using TCP SEND MODULE (SR_USEND). How to send data only 3-4 times? The process is cyclical. From time to time a message is sent. I would like to send data only once or a few times and wait for a response. How to stop sending? I knwo that block have EN input. But how to change it value using FBD?
Using SEND Module and Receiver module sometimes it work, but sometimes only sending or receiving. I have configured hardware Ethernet TCP Module like:
End TCP MODULES SEND - RECIVER
If in above answer you want to control send data based on taskcycle count then try this logic should work. here it sends value for 100 cycle note that constant value should be half(1/2) of required cycle count to be counted.
Also find .fbd file of above logic, should be possible to import in CBF 2013(10.1)
First project
https://mega.co.nz/#!npEUUTRa!hcdVH1D...
Second :
https://mega.co.nz/#!S1EF3bpA!Nf-fuMG...
I have 2 machines:
192.168.10.153 and 192.168.10.149. Machnies are in the same network.
For firstly commissioning probably it should work. But secondly have error. I have to delete emulator, load project but it's not work.
For my question with sending and reciving.
Does send block have to recive block?
I have send block and try to send something. But it's not work.
My interface:
Next my sender block :
The result commissioning :
And my Emulator config:
What is wrong that sender does not sending message? I think that it should send. To this example I didn't use receive. This machine was turned off.
Add new comment