comparing strings in s7-315

it's string[8].i wanna output fault messages,and when the problem solved,clear the message that stored in db.but i don't know how to identify the one i need to clear if string[] can't be compared in s7.it seems that step7 havn't comparision instructions for string type,only for int,d-int,float.
 
In the standard library there's a folder of IEC FCs and FBs. There's a string compare block in there, I'm pretty sure it's FC10.
 
hi,RGB.thanks for helping!but it defined string[254],and what i need is string[8].can this be solved?
 
It states STRING[254] because that's the maximum allowed stringlength. Just put your STRING[8] values to the parameters of FC10 and it should work fine! If you put a short string into a long one there's no problem, if you put a long string into a short one, its 'tail' is removed.

Kind regards,

Jean Pierre Vandecandelaere
 

Similar Topics

Hi, I will be scanning in a barcode. Here I will compare the scanned string against a table (DB) of known barcodes. Has anyone used FC10...
Replies
2
Views
4,488
I’m running a micro 820 to measure a tank level, then turning on equipment at certain levels. I have an analog input (4-20) that I’m storing and...
Replies
10
Views
317
How do you go about implementing, on the M580 PLC, how many days, hours, minutes before a predefine event in the future? The RRTC_DT yields the...
Replies
3
Views
1,839
This is a Citect SCADA question I have Six variables of type REAL (Float) to compare and determine (identify) which variable has the highest...
Replies
4
Views
1,445
I have currently made a logic to read Serial input from a barcode scanner. The situation is that I need to read the barcode from the machine and...
Replies
5
Views
2,055
Back
Top Bottom