Kiiza

S7 200 SEG INSTRUCTION

4 posts in this topic

Hello guys.

We are trying to replace a S7 200 PLC at our station with S7 1200.  We are reading the program on the S7 200 and recreating the same on the S7 1200. However, we have encountered the SEG  instruction used several times in the S7 200 (microwin) program. And the SEG instruction is not available in TIA Portal (we are using TIA 11) for the S7 1200. We have tried to read the s7 200 system manual but the explanation of the instruction is not sufficient to help recreate it.

Could anyone know how we can create our own equivalent of the SEG instruction?

If anyone has the SEG instruction already created as a program, it would be very helpful.

Thank you.

 

SEG1.PNG

Share this post


Link to post
Share on other sites

Hi guys,

I managed to get the instruction in STL; I have attached it in the Screenshot down. However, now the challenge is, I need to implement it in SCL since the later versions of TIA do not support STL any more.  If any one knows SCL and may help us to convert it, it would help us a lot.

Thank you.

CaptureSEG.PNG

Share this post


Link to post
Share on other sites

Posted (edited)

Analysis: the integer value stored in VB50 (decimal "1") is sent to the 7-segment display (QB5) when bits M0.3 AND M17.1 are both true (high, ON, 1). The 7-segment display must see segments b and c both equal 1; all other segments must equal 0.

The S7-200 manual (p325) shows the relationship between the integer value to be displayed and the corresponding segments that must be ON for the correct value to be seen on the 7-segment display. The 7 segments are ordered from "a" to "-", with segment "a" being the LSB of the byte and "-" being the MSB of the byte.

In the network example you provided, only integers 1, 2, 3, 4, and 0 are displayed on the 7-segment display. These integer values can be directly converted to a decimal value that will turn on the corresponding segments of the 7-segment display. The resulting code is shown below. It is a direct replacement of your network 76 without inventing a module to act as the "SEG" instruction. Nice, quick, simple, and easy. Just what the doctor ordered! :)

Edit 18 June 2019: The absence of the "SEG" instruction for the 12## series CPUs is not due to the TIA Portal programming software. Rather it is because of the CPU (hardware) you are working with. The "SEG" instruction is available in TIA Portal when working with 15## and 3## series CPUs. I suspect the instruction is also available for the 4## series CPUs but I cannot confirm this because I don't have any current projects in TIA Portal that use this series of hardware.  The TIA Portal software only allows access to instructions compatible with the hardware you are programming.

 

MrPLC FC001.png

Edited by pop29684
Additional information about TIA Portal instructions

Share this post


Link to post
Share on other sites
On 6/17/2019 at 0:59 AM, pop29684 said:

Analysis: the integer value stored in VB50 (decimal "1") is sent to the 7-segment display (QB5) when bits M0.3 AND M17.1 are both true (high, ON, 1). The 7-segment display must see segments b and c both equal 1; all other segments must equal 0.

The S7-200 manual (p325) shows the relationship between the integer value to be displayed and the corresponding segments that must be ON for the correct value to be seen on the 7-segment display. The 7 segments are ordered from "a" to "-", with segment "a" being the LSB of the byte and "-" being the MSB of the byte.

In the network example you provided, only integers 1, 2, 3, 4, and 0 are displayed on the 7-segment display. These integer values can be directly converted to a decimal value that will turn on the corresponding segments of the 7-segment display. The resulting code is shown below. It is a direct replacement of your network 76 without inventing a module to act as the "SEG" instruction. Nice, quick, simple, and easy. Just what the doctor ordered! :)

Edit 18 June 2019: The absence of the "SEG" instruction for the 12## series CPUs is not due to the TIA Portal programming software. Rather it is because of the CPU (hardware) you are working with. The "SEG" instruction is available in TIA Portal when working with 15## and 3## series CPUs. I suspect the instruction is also available for the 4## series CPUs but I cannot confirm this because I don't have any current projects in TIA Portal that use this series of hardware.  The TIA Portal software only allows access to instructions compatible with the hardware you are programming.

 

MrPLC FC001.png

This is really easy and very helpful.

Thank you very much.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now