Lookout

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I establish connection between DirectSoft Programming software and LookOut



@kone wrote:
...
For example when thumbwheel v alue = 1, bits Y110 and Y113 should go high
and when thumbwheel value = 2, bits Y114 and Y115 should go high and so on..
I have thumbwheel values from 0 to 9.  ...

Kone,

 

I can't look at your file, but a possible option is to create a connection to DL06's V40504 (alias VY100 … 16 bits for V100-V116) and use an expression with the lookup/choose function.

 

choose(thumbwheel.value+1,?,2304,12288,?,?,?,?,?,?,?)

 

For 0:?

For 1: 0000 1001 0000 0000 =0x0900=0d2304

For 2: 0011 0000 0000 0000 =0x3000=0d12288

etc.

 

If you're using C bits in the PLC program to control your Y outputs, then you just have to change the connection to the appropriate Vmem location (V40600-V40677).

 

… but I would stick to writing as decimal not BCD.

 

Good luck.


=====================================================
Fading out. " ... J. Arthur Rank on gong."
0 Kudos
Message 11 of 13
(1,367 Views)
I have used a nested NIF function to make sure that certain values output the correct value. An Example is:
 
 

ConvWidthSvRawW= nif(ConvWidthSvW=4.10,1040,nif(ConvWidthSvW=4.60,1120,nif(

                ConvWidthSvW=5.10,1296,nif(ConvWidthSvW=8.20,2080,nif(

                ConvWidthSvW=8.70,2160,nif(ConvWidthSvW=9.70,2416,nif(

                ConvWidthSvW=10.20,4128,nif(ConvWidthSvW=16.40,5696,nif(

                ConvWidthSvW=16.90,5776,nif(ConvWidthSvW=17.40,5952,nif(

                ConvWidthSvW=17.90,6032,nif(ConvWidthSvW=18.40,6208,nif(

                ConvWidthSvW=18.90,6288,nif(ConvWidthSvW=19.40,6464,nif(

                ConvWidthSvW=19.90,6544,nif(ConvWidthSvW=20.40,8256,(sum(mod(

                ConvWidthSvW*100,10),mod(trunc(ConvWidthSvW*100/10),10)*16,mod(

                trunc(ConvWidthSvW*100/100),10)*16^2,mod(trunc(ConvWidthSvW*100/

                1000),10)*16^3,mod(trunc(ConvWidthSvW*100/10000),10)*16^4))))))

                )))))))))));

 

You may need to do the same thing for your values. Depending on how many you have you may end up with a very long expression.

 

Robert

0 Kudos
Message 12 of 13
(1,330 Views)

Thanks ! Now my system works fine.

I would like to ask one more question:

I am using a pot object for my thumbwheel and it has a increment button and decrement button. The range of my thumbwheel is from 0 - 9. If i press the increment button after 9 it does not do anything. I would like to change it so that the range becomes 0 after 9. For instance if we press the increment button after 9 it should go like 9,0,1,2,3....9,0 and for the decrement button after 0 it should be like 0,9,8,7,....0,9.. Can this be done with LookOut Direct? I have tried using expression like

if(pot.value>9, 0, pot.value)  -------- for increment button, but its not working.

Can you me any suggestions to get over my problem please!!!

Thanks again

regards

Kone

 

 

0 Kudos
Message 13 of 13
(1,316 Views)