variable input time

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #13068
    Med_Support
    Moderator
    labrat

    Good evening,
    Is there a way to specify that an input should occur at a random time inbetween 60 and 90 seconds? Below I pasted the code I was working on. I have it set for 30 seconds, but ideally I would like it to be random inbetween 60 and 90:

    30": ON ^LeftLight, ^LeftLever ---> S3
    

    Thank you.

    #13069
    Med_Support
    Moderator
    Gary Bamberger

    The best way is to create a LIST and then draw from it randomly

    LIST Z = 60", 65", 70", 75", 80", 85", 90"
    
    S.S.1,
    S1,
    #START: ---> S2
    S2,
    #R^LeftLever: RANDD Y = Z;
    OFF ^LeftLight, ^LeftLever ---> S3
    
    S3,
    Y#T: ON ^LeftLight, ^LeftLever ---> S2
    
    #13072
    Med_Support
    Moderator
    labrat

    Thank you! That worked beautifully:)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.