You are not logged in.
Pages: 1
Topic closed
Hi,
I may be missing something altogether but I am using a few EPC blocks that get triggered at different times, but I also need to trigger all of these one time only after boot, or program startup, then continue to operate normally from the timer based math.
Everything seems to be working fine except for not being able to find a run once block in any of the libraries.
Thanks,
Gizmo
Offline
Hi gizmo,
I may be very wrong here, as I haven't tried this and it's possibly not how the block was intended to work. Can you use an MP block with say a 2 second pulse but with BSTATE set to "on" as default? On boot it will start in an on state and turn off once the pulse has expired.
In my head it works, in reality it might not..!
Offline
Mike,
I was thinking of the same thing myself. I have not tried this yet but logically it should work. In the back of my mind I have this thought maybe a rule is in existence and this would not be best practice. :-) I will let you know how this works out.
I have also read your post on fan speed control. I would have posted a reply but I am afraid at this moment I will not be much of use for this in the REX environment. I can think of several methods in other PLC formats that would make this work for you, but unfortunately in the REX environment I don't not have a variable speed fan handy that I can adapt over quickly.
Thanks very much for the help.
Last edited by gizmo (2017-11-14 22:54:06)
Offline
Hi,
it is possible to use MP block. I often use BIS block setup as follows:
Hope it helps.
Regards, Tomas
Last edited by jaroslav_sobota (2017-11-21 09:47:17)
Offline
Kudos to both,
I feel really logically ashamed of myself. My original code was and still is using the BIS block. Almost in the same manner. After I wrote the code and put it to test my code seemed to be ok, but I was thinking the data I was seeing was still in RAMDRIVE, after leaving for work for the day this stayed heavily on my mind that in the event that a reboot was needed that I would have to wait till the BIS completed its time of 3600 SEC to get first update.
I guess my Rockwell PLC logic thinking was kicking in. Shame on me!!!
For some reason I found that I am doing this method though.
No.1 - Y0 - OFF
No.2 - t1 - 0
No.3 - t2 - 1
No.4 - t3 - 3600
No.5 - t4 - 0
No.6 - t5 - 5
No.7 - t6 - 6
No.8 - t7 - 7
No.9 - t8 - 8
No.10 - RPT - on
I do not remember why I did this, this way, it was part of some early code in this project but it always worked I just modified between NO. 2 - 4 and left No.10 on.
Any suggestions on if this causes an inefficacy issue in the code? My project is growing larger as I keep adding code, I am at 882 blocks. 4 tasks at the moment. As I continue this project I want to make sure my efficacy maintains well.
Thanks,
Offline
Hi,
the MP block cannot be used for such a purpose. MP stands for manual pulse and therefore it only reacts to manual changes in the BSTATE parameter. See the documentation of the MP block.
Whenever the algorithm is restarted, the blocks start from scratch. Therefore your use of the BIS block is correct, it will generate 1 second pulse whenever the algorithm is (re)started and it will repeat each hour.
If you need to generate pulses hourly, regardless of restarts, use the TIME block as a trigger.
Kind regards,
Jaroslav
Monarco HAT for Raspberry Pi - Lightweight I/O for monitoring, archiving and control.
Raspberry Pi in industrial automation!
Offline
Pages: 1
Topic closed