noorloai

MrPLC Member
  • Content count

    58
  • Joined

  • Last visited

Community Reputation

0 Neutral

About noorloai

  • Rank
    Sparky

Profile Information

  • Country Canada

Recent Profile Visitors

1070 profile views
  1. writing from HMI to Array SINT [24] in PLC

    I have the following: Array of SINT[24] call it Sorted[24] has a sorted vehicles based on its position If there is less than 24 vehicles on track, I need operator to insert gaps which will shift the first Array elements based on the location that operator select I want operator to select from HMI whether this location is full or empty which write to another Array of SINT[24] call it Gap[24], 0 means full, 99 mean empty   Example: Sorted[21]= [6,7,8,9,…..,10] Operator can add up to 3 gaps, Based on operation selection Gap[24]= [0,99,99,99,0….0] Output Array = [6,99,99,99,7,8,9,…..10] So what I am thinking is to map 24 buttons on HMI to Bool[32] on PLC only 24 used, Then if operator select that bit it will write 99 to Array SINT[24] Else it will write 0 Then I can compare my sorted array with my gap array and find the output array. If you have a better solution/idea would be appreciated.  
  2. writing from HMI to Array SINT [24] in PLC

    “Do the array elements match up? In other words, will pressing BOOL[7] write 99 to SINT[7]?" ·         Yes It does match Why 48 rungs with only 32 buttons? Do you have an example of what you've done so far that does what you want for one button?” ·         As I have two condition 0 and 99 , and I have 24 elements
  3. What is the easiest way that HMI writes to Array of SINT[24] ? Like I am thinking to have a maintain buttons that points to a BOOl[32] elements in PLC when button press on HMI the bit in BOO[32] will be active high and then can write 99 a member in to SITN[24] , else will write 0. But that required 48 rungs . Is there any other efficient suggestion ? Thanks  
  4. Thanks for your response. I also found a tech note that explain that using this  MyArray[(MyIndex AND NOT 31) / 32 ] . [MyIndex AND 31]  
  5. Hi All,   I have a question on if its possible to do indirect addressing of individual bits of a tag of datatype dint in studio5000 ladder logic? I am writing a routine that should  loop through the individual bits of the tag of data type dint and do processing . Like instead of using OTE instruction ConfirmRequest[rvIndexSafety] where confirm Request is BOOL[32] elements  if condition true and rvIndexSafety =1 => it will set confirmRequest[1]  I need to use DINT and set DINTDataType.1  How can i approach this?   Thanks,  
  6. Using TON within Loop in Ladder logic

    there is no condition on JSR, BUT I am using conditional MCR to execute those codes . Is there any other solution ? 
  7. Hi All, I have an issue and hoping you can help me with the solution.  I am not sure how can I use TON within loop in ladder logic? I have made a loop using JSR and LBL to execute Sub, in this subroutine I need to use timer or delay before turning the output on, as I am facing an ON/Off condition which turn the output on. Is there any suggestion ? Appreciate your response in advance. Thanks,
  8. array in studio5000

    Thanks a lot, That was very helpful, I did it same way and it works as I wanted.  Thanks again
  9. Hi Guys, Is there a way to logic AND array element in ladder logic studio5000 ? I have Array[BOOL 64], and I want to make sure all the elements are 1 to activate an LED.  I was thinking to use FAL instruction however this instruction does not accept BOOL. is there any suggestion ? Thanks,  
  10. Masking array in ladder logic

    Hi Guys, I have an Array of BOOL [52].I want to mask this array based on size (SINT) . like if my array size is 12, I want to pass the first 12 elements of Array of Bool and block the rest. I am not sure how to use MVM. Can someone help me with that ? Thanks 
  11. array in studio5000

    well, the value in array 1 changes dynamically, but in array 2 is not. and its ascending order. I want to check the array 1 element value with array 2 values and get the closest bigger  number in array 2 so I can update my target to the closest number  and repeat that for each element in array 1 example: target position =0  current array[1] = 20000, compare with the constant array 2 , which is between 18000 and 25000 values then take the closest bigger number and move it to the target position   
  12. array in studio5000

    Hi All, I have two DINT array for example array1 [200] = [ 0, 1.........199], array2[100] = [ 20,40,60 ...180]  array1[30] = 30 need to compare it with array2[100]  and find the closest range. in my example array1[30] is between array2[0] and array2[1] how can I do that in studio5000? I haven't worked with array before and therefore your support is appreciated  Thanks  
  13. I figured out Thanks anyway  
  14. Hi all, I have downloaded the studio5000 emulator to test my application, I manage to download my plc program to virtual backplane emulator plc and got it run . Now I am trying to use factoryTalk studio with it, however I am facing an issue with communication setup. I have added RSLinx Enterprise server to my application, and I am trying to navigate to my emulator processor but I cant find it . in RSLinx classic it shows me yellow question mark as it shows in the attachment. can someone explain to me what did I miss? Thanks in adavnce
  15. setting BOOL [64] in Studio 5000

    oh do you mean I have to use LIM instruction to check my range and if its not within this range I write 0 then execute this rung ?