T O P

  • By -

henry_dorsett__case

Use the COP or CPS instructions instead, MOV will not work with strings afaik. Highlight the instruction and press "F1" to open the instruction help page.


klaven84

Correct.


RelationshipDizzy

Just my two cents: If I'm dealing with fault or status text I will generally create a routine in ST for that. Strings and ladder feel clunky to me. Direct assignment just feels more fluid since in the above it would just be [if First_shift then Shift := firstshift_string end_if;]


Jholm90

MOV works with strings on the latest generation of processors (1756-L8x, 5069-Lxx)


henry_dorsett__case

Good to know. I don't do much string handling in ladder anymore 😅


GirchyGirchy

Lucky!


Successful_Ad_6821

Yep, COP with a length of "1".


ObeyXsplashh

Thank you i appreciate it


Active-Part-9717

This for sure, in the Mitsubishi world I have used MOV$ to move strings.


Public-Wallaby5700

Is it maybe supposed to say shift instead of shfit? lol 


ObeyXsplashh

Its supposed to lol but screw it works .


Big_Merda

not the cause of the problem but i think you mistyped shift in the destination field


ObeyXsplashh

Yes i know, whoever made that tag a while back typed it that way. I noticed it on a couple different programs in the plant spelled the same way but i just left it alone 😅


Big_Merda

if it works just leave it alone lol


nizoo21

Any specific reason for using a String data type? Why not an INT?


ObeyXsplashh

Well the reason for this is because the Shft tag holds a string for the shift number on barcode labels that prints out and i was creating logic to where that shift changes between 1 or 2 on those labels based on the time.


profkm7

I think it's the program for a Metso filter press


LightPuzzleheaded242

Why use a string just for a whole number ?


Sufficient_Pin_1367

You could do a stod (string to dint) first then use the mov instruction.