I'm using a 40X2 with a single input, pin D.7, and 31 outputs, A.0 through D.6. When I detect a pulse on the input I want to send a pulse to an output at random. I generate a random number, b2 = 1 to 31, each number represents one of the outputs, as follows (with symbols for the output pins):
symbol L1 = A.O b2 = 1 corresponds to output A.0
symbol L2 = A.1 b2 = 2 corresponds to output A.1
symbol L3 = A.2 b2 = 3 corresponds to output A.2
etc.
What I don't know how to do is to turn the random numbers which represent the outputs, 1 through 31, into the symbols L1 through L31 so I can use the pulsout command; for example, if b2 = 1 then I want the pulse on pin A.0:
pulsout L1, 10
Thanks for any suggestions.
McAlester
symbol L1 = A.O b2 = 1 corresponds to output A.0
symbol L2 = A.1 b2 = 2 corresponds to output A.1
symbol L3 = A.2 b2 = 3 corresponds to output A.2
etc.
What I don't know how to do is to turn the random numbers which represent the outputs, 1 through 31, into the symbols L1 through L31 so I can use the pulsout command; for example, if b2 = 1 then I want the pulse on pin A.0:
pulsout L1, 10
Thanks for any suggestions.
McAlester