Industry Online Support
Technical Forum
4/21/2013 12:40 AM | |
Posts: 2 Rating:
|
Hello. I want to store the CPU date and time in the variable "#timp" (MB 20), but when I run the simulation in plsim the only value displayed is "1999-11-30-00:00:00". I use: simulink v5.5 +sp1 PLCSIM v5.4 +sp5 AttachmentSFC1.zip (195 Downloads) |
4/21/2013 8:06 AM | |
Joined: 1/28/2009 Last visit: 8/26/2024 Posts: 6846 Rating:
|
Hello, Generally you have mistaken the difference between Local memory area in OB1 and Global memory area such as MB20. Your codes seem to be OK,if you transfer data saved in variable "timp".For your information, Date and Time is one of complex data types which consists of 8 byte and for transferring it from local area of OB1 to global area you can try SFC20. Another point to be checked is "set" date and time of your CPU which is possible via LAD/STL/FBD editor. Also plenty of similar discussions can be Searched here and an FAQ HERE.Finally, name of Software we are working is "STEP7" not simulink (which is a tool inside MATLAB) I hope these comments help you Hamid Hosseini |
Last edited by: hdhosseini at: 8/2/2018 10:12:09 AM |
|
This contribution was helpful to
1 thankful Users |
4/21/2013 1:00 PM | |
Posts: 2 Rating:
|
Thank you so much !!! |
4/21/2013 3:08 PM | |
Joined: 1/28/2009 Last visit: 8/26/2024 Posts: 6846 Rating:
|
and to do that practically, check my brief test as shown in the attachment.Normally, I also prefer to use "#ret" for return value parameter which is helping for quick test. AttachmentUHR_ZEIT.zip (376 Downloads) |
Last edited by: hdhosseini at: 4/22/2013 1:26 PM |
|
This contribution was helpful to
1 thankful Users |
Follow us on