1/27/2020 10:15 PM | |
Posts: 3 Rating: (0) |
I think this is a question for the experts, I can't figure it out to write a program less complex then this in the attachment. Short intro, 4x digital inputs (4DI) and 1x analog output (1AO). Each input or combination of inputs needs to send a specific (fixed) value to an anlog output. Use: status fume hoods (labo) -> control VAV-unit (Variabel Air Volume) Looks easy but don't forget that the "total" of DI-combinations is 15! I1 -> analog value 1 I2 -> analog value 2 …etc I1 & I2 -> analog value 5 I1 & I3 -> analog value 6 …etc I1 & I2 & I3-> analog value 10 I1 & I2 & I4-> analog value 11 …etc I1 &I2 &I3 & I4 -> analog value 15 At the moment I use a lot of multiplexers with the combination of mathematics, comparators to calculate the highest analog value. No,no, way too complex but it works, unfortunately without a detailed explanation no one will understand. At first I thaught to use 15 flags (DI comb.) and also to use 15 predefined analog values -> that's easy (like in our bigger PLC's, data in DB's) But I can't see any possibility how to store the15 predefined analog values, I'm missing something? Is there anyone outhere who can figure this out or does I need to choose the complex way like the example? Any help will be very appreciated. Many thanks, Dave AttachmentCombinatie_Trekkasten.zip (365 Downloads) |
1/28/2020 5:44 AM | |
Joined: 12/18/2014 Last visit: 11/2/2024 Posts: 34124 Rating: (4249)
|
What I can now see from your description: Is this so? If so, then the solution is V2 in the attachment the right.
AttachmentCombinatie_Trekkasten_V2+V3.zip (359 Downloads) |
This contribution was helpful to1 thankful Users |
1/28/2020 10:18 PM | |
Posts: 3 Rating: (0) |
Dear ixo65, your solution V3 was what I needed. Although I don't understand how to use VM, this solution works "super".
Since I do not yet understand how you can extract something from the VM, I assume that the parameterization of the network outputs and the network analogue inputs as above is probably wrong? Attached the separate programs for each room separately, these work as expected. To make the program readable, I have placed all the rooms on a separate page. To easily reformulate the question: Many thanks to figure this out. AttachmentAll Rooms_Combined + Individual room.zip (327 Downloads) |
Last edited by: dstae73 at: 01/28/2020 22:19:41 |
|
1/29/2020 4:19 AM | |
Joined: 12/18/2014 Last visit: 11/2/2024 Posts: 34124 Rating: (4249)
|
You have overlaps in the VM memory area. Examples of addressing for the possible operands. However, since you have chosen a one-spacing for words in your program, there is overlap. AttachmentLOGO! Bit, Byte, Word and DWord.pdf (359 Downloads) |
This contribution was helpful to1 thankful Users |
1/29/2020 4:31 AM | |
Joined: 12/18/2014 Last visit: 11/2/2024 Posts: 34124 Rating: (4249)
|
Here the corrected version of the viagramm "All rooms-Combined".
AttachmentAll Rooms_Combined_V2.zip (353 Downloads) |
This contribution was helpful to1 thankful Users |
1/29/2020 3:53 PM | |
Joined: 12/18/2014 Last visit: 11/2/2024 Posts: 34124 Rating: (4249)
|
Hello dstae73, you're welcome ... |
Follow us on