khelza Member K Join Date Sep 2015 Location Ontario Posts 67 Mar 1, 2016 #1 Hi all, I am working offline on some code where I am comparing two values. B3:20 = 0000 0111 (7) N7:17 = 7 If I compare the two in an EQU function, will it work? Or do they need to be of the same type?
Hi all, I am working offline on some code where I am comparing two values. B3:20 = 0000 0111 (7) N7:17 = 7 If I compare the two in an EQU function, will it work? Or do they need to be of the same type?
Donnchadh Lifetime Supporting Member D Join Date Jun 2002 Location Ireland Posts 1,004 Mar 1, 2016 #2 Hi Unlike Siemens this will work You could also do a MOV instruction of b3:20 to n7:8 And then use the EQU if you wish Donnchadh
Hi Unlike Siemens this will work You could also do a MOV instruction of b3:20 to n7:8 And then use the EQU if you wish Donnchadh
khelza Member OP K Join Date Sep 2015 Location Ontario Posts 67 Mar 1, 2016 #3 Donnchadh said: Hi Unlike Siemens this will work You could also do a MOV instruction of b3:20 to n7:8 And then use the EQU if you wish Donnchadh Click to expand... The MOV instruction seems unnecessary in that case, or is it just for my own reassurance?
Donnchadh said: Hi Unlike Siemens this will work You could also do a MOV instruction of b3:20 to n7:8 And then use the EQU if you wish Donnchadh Click to expand... The MOV instruction seems unnecessary in that case, or is it just for my own reassurance?
Mickey Lifetime Supporting Member Join Date May 2003 Location Palmdale,Ca Posts 10,659 Mar 1, 2016 #4 khelza said: Hi all, I am working offline on some code where I am comparing two values. B3:20 = 0000 0111 (7) N7:17 = 7 If I compare the two in an EQU function, will it work? Or do they need to be of the same type? Click to expand... That will work just fine. Source A must be a word address, source B can be a constant or word address.
khelza said: Hi all, I am working offline on some code where I am comparing two values. B3:20 = 0000 0111 (7) N7:17 = 7 If I compare the two in an EQU function, will it work? Or do they need to be of the same type? Click to expand... That will work just fine. Source A must be a word address, source B can be a constant or word address.
daba Lifetime Supporting Member D Join Date Jul 2004 Location uk Posts 5,401 Mar 1, 2016 #5 Mickey said: That will work just fine. Source A must be a word address, source B can be a constant or word address. Click to expand... Just to clarify.... Source A can be a word (data-table) address, or a constant (literal). Source B can be a word (data-table) address, or a constant (literal). The compiler will accept both A and B as literals, but there is no point, that's just silly....
Mickey said: That will work just fine. Source A must be a word address, source B can be a constant or word address. Click to expand... Just to clarify.... Source A can be a word (data-table) address, or a constant (literal). Source B can be a word (data-table) address, or a constant (literal). The compiler will accept both A and B as literals, but there is no point, that's just silly....
Mickey Lifetime Supporting Member Join Date May 2003 Location Palmdale,Ca Posts 10,659 Mar 1, 2016 #6 daba said: Just to clarify.... Source A can be a word (data-table) address, or a constant (literal). Source B can be a word (data-table) address, or a constant (literal). The compiler will accept both A and B as literals, but there is no point, that's just silly.... Click to expand... I disagree See pdf's But, I don't have a SLC or ML???? to try it. Maybe someone can.
daba said: Just to clarify.... Source A can be a word (data-table) address, or a constant (literal). Source B can be a word (data-table) address, or a constant (literal). The compiler will accept both A and B as literals, but there is no point, that's just silly.... Click to expand... I disagree See pdf's But, I don't have a SLC or ML???? to try it. Maybe someone can.
Mickey Lifetime Supporting Member Join Date May 2003 Location Palmdale,Ca Posts 10,659 Mar 1, 2016 #7 And here is the error message...
Donnchadh Lifetime Supporting Member D Join Date Jun 2002 Location Ireland Posts 1,004 Mar 1, 2016 #8 Hi Sorry Just to Clarify I said you could also use a MOV instruction and I should have stated as I did not have the software in front of me Logic 500 is very good at allowing you to mix data types within instructions Donnchadh
Hi Sorry Just to Clarify I said you could also use a MOV instruction and I should have stated as I did not have the software in front of me Logic 500 is very good at allowing you to mix data types within instructions Donnchadh
daba Lifetime Supporting Member D Join Date Jul 2004 Location uk Posts 5,401 Mar 3, 2016 #9 Mickey said: And here is the error message... Click to expand... I stand corrected... Done very little 500 stuff for so long.... Perhaps I just assumed it would be OK, like it is in 5000
Mickey said: And here is the error message... Click to expand... I stand corrected... Done very little 500 stuff for so long.... Perhaps I just assumed it would be OK, like it is in 5000
Mike_RH Lifetime Supporting Member M Join Date Sep 2006 Location Toronto Posts 896 Mar 3, 2016 #10 Try putting the rung in with N7:0 as operand A and the constant as operand B.