Multiplexed inputs

burnem83

Member
Join Date
Aug 2008
Location
Liverpool
Posts
17
Hello guys

This is my first time posting on here so I apologise if my terminology is incorrect as I am new to this game.

I currently have a problem with an e-stop message system in work that uses 'multiplexed' inputs. there are 16 e-stop messages that need to be displayed from only 8 input posistions, diodes are used alongside 2 seperate outputs to diffrentiate between two possible locations.

My problem is that however I program the PLC (which is a siemens s7-400) I either get both messages from a given input or none. I know there must be a simple way of doing this but I have tied myself in knots all day.

I appreciate this information may seem a little vague but any info would be helpful

Thanks
 
Is the messaging system a separate piece of hardware connected to the plc ?
I see 10 outputs from the plc, 8 deciding the message, 2 selecting which bank of 8 to display - is this correct ?
 
Im using an op7 which is communicated to via profibus, I have no problem showing the messages when I set the correct bit in my Data Block by forcing the values.

I am having problems with the logic as I always seem to be setting both the messages associated with each input, I am finding it difficult to put into words the problem I am having but i will try. The two outputs each provide 24v to 8 of the e-stop NO switches and the PLC needs to determine by which output is on which e-stop of a possible 2 has been triggered.

I have tried using a timer so the first output is sctivated for 1 second and any inputs setting the data bit, then the outputs are switched so the second batch of e-stops are monitored, but however I arrange the logic I set 2 messages when 1 e-stop is hit.

I think this would be a very easy solution to someone with more experience so I am hoping someone has used this method themselves.

Cheers
 
Last edited:
Assuming you are using 16 inputs (2 tied to each input via diodes)then each of the two sets of 8 lines fed from outputs in the plc to "SCAN" then you need to time output 1 on + delay read 8 inputs & store the 8 bits into an array of 8 bits, then turn off output 1, delay a few ms, turn on output 2, delay x ms then store the 8 bit data in second array.

____|---|___________ output 1

_____|-|____________ Read 8 bits to array 1

__________|---|______ Output 2

___________|-|_______ Read 8 Bits to Array 2

obviously the outputs must source the alarm bits as 0-7 output 1
8-16 output 2 the timing can be reduced to speed up the scan but you must allow for the filters of the inputs & the delay of the outputs usually in ms.
I have done multiplexing inputs (when one of our designers got it wrong on plc i/o size), so a quick fix was to supply two simular control stations from 2 outputs & incorporating diodes to stop feedback from one button to another, only allowing buttons pressed on one station when the multiplex output 1 was on, plc code was easy, "AND" the output 1 with ixx gives station 1, output 2 with ixx gives station 2
 
Thanks parky


Think this may be the info I was looking for, have tried it a similar way earlier but didn't store the data in an array and didn't allow a delay in between outputs being triggered.

Forgive me for my ignorance but is an array another name for a temp data block.

Cheers
 
Last edited:
You mean Data word, basicaly yes it's an array of bits use timers to delay the triggers
so you have the output come on 100ms before the trigger to move the 8 inputs to say a dataword (or bute) in your DB.
e.g
Set output 1 on
wait 100ms
on a oneshot move IB (input byte) to DB10.DBB2.0
turn output off
Set Output 2 on
Wait 100ms
On a oneshot move IB to DB10.DBB3.0
so DB10.dbx2.0 = alarm 1
DB10.dbx2.1 = alarm2
& so on
DB10.dbx3.0 = alarm 8

or do the same using Mwords (Flags)
mov IB to MB 10
 
Last edited:
Here's the source code for a function block that will process your e-stop bytes. It will compile into ladder.

Code:
FUNCTION_BLOCK FB 3
TITLE =
VERSION : 0.1

VAR_INPUT
  byInputs : BYTE ; 
END_VAR
VAR_OUTPUT
  byFirstEight : BYTE ; 
  bySecondEight : BYTE ; 
END_VAR
VAR_IN_OUT
  bSelectFirstEight : BOOL ; 
  bSelectSecondEight : BOOL ; 
END_VAR
VAR
  sfbTimer : SFB 4; 
END_VAR
BEGIN
NETWORK
TITLE =100ms timer
	  AN	#sfbTimer.Q; 
	  =	 L	  0.0; 
	  BLD   103; 
	  CALL #sfbTimer (
		   IN					   := L	  0.0,
		   PT					   := T#100MS);
	  NOP   0; 
NETWORK
TITLE =sample inputs
	  A	 #sfbTimer.Q; 
	  =	 L	  0.0; 
	  A	 L	  0.0; 
	  A	 #bSelectFirstEight; 
	  JNB   _001; 
	  L	 #byInputs; 
	  T	 #byFirstEight; 
_001: NOP   0; 
	  A	 L	  0.0; 
	  A	 #bSelectSecondEight; 
	  JNB   _002; 
	  L	 #byInputs; 
	  T	 #bySecondEight; 
_002: NOP   0; 
NETWORK
TITLE =toggle sample
	  A	 #sfbTimer.Q; 
	  =	 L	  0.0; 
	  A	 L	  0.0; 
	  A	 #bSelectFirstEight; 
	  S	 #bSelectSecondEight; 
	  A	 L	  0.0; 
	  AN	#bSelectFirstEight; 
	  R	 #bSelectSecondEight; 
NETWORK
TITLE =
	  AN	#bSelectSecondEight; 
	  =	 #bSelectFirstEight; 
END_FUNCTION_BLOCK
 

Similar Topics

Hi All, Desperately looking for STEP 7 code example to help urgent project! I am wishing to interface 5 (five) multiplexed 6 digit BCD...
Replies
3
Views
3,062
Compactlogix controller, program has 28 conveyors that use TON's to start the conveyors. The TT sounds a warning horn during start and the DN...
Replies
10
Views
482
I am converting a SLC 500 to a Compact Logix. I plan on using a Compact Logix 5380 with conversion Kit. The problem is that the analog input cards...
Replies
1
Views
144
Hi there, I'm doing some extensive testing and commissioning with a slew of new Emerson PACSystems RX3i PLCs. It would be convenient to...
Replies
5
Views
95
Problem: Our PLC can only output 4-20mA, but the actuators it needs to control, modulate based on a 0-135Ohm signal. Buying 4 or 8 individual...
Replies
7
Views
268
Back
Top Bottom