T
Hi, i've just learn to program in LAD a few months back and now ive some questions to asks:
1. how to implement a pointer to a data block. If in the data block, it consist of an array how do i use a pointer to increment the index of the array.
2.Also (without using pointer) when i have an array in my data blcok, how do i increment the index after each loop? Do i have to use a counter which output to a memory word (eg MW1) and use that memory word as an index. EG.
arr[MW1].
3.Right now im programming all my codes into 1 FC which i think is no good. So when i divide them into different FCs, how do i pass informations btw each FCS? For instance do i activate all FCs in my OB1 and just use gobal variables? Or is it better to activate and deactivate each FCs base on conditions?
eg.
1st call to Input Station block
2nd if sensor detects incoming workpiece, call to Transporter block.
3rd If transporter has pick up the workpiece, deactivates Input Station block.
4th Call to Input station block if transporter has release the workpiece at the testing station.
blah blah...
Which one is better?
That's all i have to ask
Thank you everyone
regards
Toni
1. how to implement a pointer to a data block. If in the data block, it consist of an array how do i use a pointer to increment the index of the array.
2.Also (without using pointer) when i have an array in my data blcok, how do i increment the index after each loop? Do i have to use a counter which output to a memory word (eg MW1) and use that memory word as an index. EG.
arr[MW1].
3.Right now im programming all my codes into 1 FC which i think is no good. So when i divide them into different FCs, how do i pass informations btw each FCS? For instance do i activate all FCs in my OB1 and just use gobal variables? Or is it better to activate and deactivate each FCs base on conditions?
eg.
1st call to Input Station block
2nd if sensor detects incoming workpiece, call to Transporter block.
3rd If transporter has pick up the workpiece, deactivates Input Station block.
4th Call to Input station block if transporter has release the workpiece at the testing station.
blah blah...
Which one is better?
That's all i have to ask
Thank you everyone
regards
Toni