S13

boxhead

Member
Join Date
Oct 2004
Posts
15
Hi all,
I have a question that hopefully someone here can answer for me. At work we have an SLC 5/05 which runs a series of samplers around our plant. Some of the samplers take a cut off the conveyor at set intervals but another has a random timing set up. I understand most of the timing system but one bit has me stuck. It first of all starts with the free running clock to generate a number, from there it goes through a series of divide and add functions which at the end generates a number ( lets say it is 15). Here is the bit i do not understand: In the same branch at the bottom ( all the add and divide blocks are above it) there is a move function which moves the value in S13 to a timer preset. Now this value may be 643. I have no idea how it gets this figure. Help tells me that S13 is the math Lo word and it says it is related to the divide and add functions etc....but i can not see how it gets the 643 from the 15? ( these are only figures i chose not ones it is showing me as i am at home at the moment).

Any help is greatly appreciated.


Cheers

Corey
 
The low byte for a LongInteger.
Used because the 500 line didn't handle DINTs worth a darned, they were crippled.
Just another way to get a more "random" number.
 
S13-Still not sure

Thank-you for the reply,

I am still unsure as to how this number is generated, Could the number be between 0-65535? If so i have never seen the number any higher than around 600? Maybe a little higher but i have never seen it. Obviously this number changes when math functions are performed. But how do you know what it will end up with?As in to make sure your random number is not to high?


Cheers

Corey
 
Look at the help on some of the math instructions. This may give you an idea of what this register contains at specific times. For example, if you do a normal integer divide (DIV), S13 will contain the remainder of the divide. As such, the SLC series will effectively perform a modulus division.

Be a little heads us with S:2/14. This bit will have an effect on what ends up in S13 for any given math function.

Keith
 

Similar Topics

I need to replace an 8 channel analog input card to the above mentioned card. I have put the dip switches in the right position to let it work as...
Replies
0
Views
2,121
Back
Top Bottom