[?]: Random inputs

SIMATIC S7-200/300/400, Step7, PCS7, CFC, SFC, PDM, PLCSIM,
SCL, Graph, SPS-VISU S5/S7, IBHsoftec, LOGO ...
Post Reply
ravender
Posts: 1
Joined: Sat Apr 02, 2011 12:57 pm

[?]: Random inputs

Post by ravender » Sun Jul 10, 2011 9:26 pm

Hello everyone!

I have a program.. for example:

Code: Select all

A i0.0
= q0.0

a i0.1
= q0.1

a i0.2
= q0.2
I want to shuffle those inputs random after pushing a button.. so after button press those code should look like:

Code: Select all

a i0.2
= q0.0

a i0.0
= q0.1

a i0.1
= q0.2
How can I make such effect?

saravanan_tsvk
Posts: 25
Joined: Tue Dec 28, 2010 2:11 pm

Re: [?]: Random inputs

Post by saravanan_tsvk » Mon Jul 11, 2011 8:51 am

I have a program.. for example:

Code: Select all

A i0.0
= q0.0

a i0.1
= q0.1

a i0.2
= q0.2
I want to shuffle those inputs random after pushing a button.. so after button press those code should look like:

Code: Select all

a i0.2
= q0.0

a i0.0
= q0.1

a i0.1
= q0.2[/spoiler]

How can I make such effect?[/quote]

Where do u want this kind of logic.

For your requirement it is good to use the memory bits instead of the direct DI's.

Use the Shift/Rotate instruction to shift the bits in the DI's and move the output value to the Memory location (M - bits) and use the M-bits at the actual logic.