Siemens S7 1200 binary output project

Lamboom

Lifetime Supporting Member
Join Date
Mar 2014
Location
Fallbrook, Ca
Posts
350
I need to make my Siemens PLC S7 (1212C) output one digital byte ..Q0.0 - Q0.7 (QB0) … output byte 0 … to represent any number from 0 to 255. The byte has to be written by the HMI.

The PLC's output will be sent to a Command Table's input, in a driver/controller for a linear motor. most of the lines in that command table have a curve instruction for that Linear Motor, which are simply, continuous sine waves. Different lines will produce sine waves of different amplitude, and period. That's it.

The work is done programming the PID driver/controller .. all that is needed, once the line number is selected on the HMI (example 27) .. is to have the PLC's QB0 output generate 0001 1011 … and the driver will run line 27's curve. How hard could it be?.. :)

I was shown earlier on this forum that this is possible with the Siemens S7 1200 equipment.

I'm running TIA V11 SP2 update 5. This is a little problem because Siemens failed to make PLC 6ES7-212-1BD30-0XB0 ver 2.01 (1212C) updateable to ver 3.0 … Things are now a little squirrelly, but It looks like I can still program and run that PLC and HMI (6AV6647-0AD11-3AX0) KTP600 Basic Color PN

The Forum gave me lots of good starting places to focus my training on HMI programming for this project. This is all for a personal project.. I'm not employed to do motion engineering, I just want to understand this work as much as possible. I should hire a programmer; however, I don't know how to do that yet…

If you could recommend someone near Fallbrook, Calif, that would be great. Better still, If there's just a few steps here, I would greatly appreciate a mini tutorial on a simple program for the HMI .. very simple! … I can always expand and improve as I study all the YouTube tutorials, and manuals on HMI programming. I'm doing fairly good at programming the PLC.

Regards, Michael

PS: I've added a SM1223 I/O module, (6ES7223-1BH32-0XB0) so that's probably the best destination for the 8-bit binary word from the HMI.
 
I hope I'm understanding you
To move a number out to an output byte- just use a move command and write a number to the input of the move
The HMI would simply write to Tag_1 in this case
See pic

ssbyte.jpg
 
Thanks for the reply JRW
I'll give it a try .. looks promising.

I'm not sure yet how to generate the numbers from 0 to 255 on the HMI .. I'm working on that ... to send to TAG_1

If I get this, TAG_2 (%QB0) would be sent to To all 8 outputs of Q0 .. tho, I think my PLC has only 6 digital outputs .. I could install an SN 1223 signal board (2)DI,(2)DO .. but, I am adding a SM 1223 I/O Module (8) 24VDC DI, (8) 24VDC DO. (That address might be QB8 ... :)
 
Last edited:
JRW .. That was a great solution .. I don't yet appreciate how elegant it is, but it works great! Thank you very much .. that was a fine presentation of how to do it .. It just took me a while to figure out that %QB.0 was just an address to the PLC's DC output .. I don't yet know where to find the addresses of many of the PLC I/O's (other than what's painted on the case .. :) .. example, what's the address of the (8)DC (byte)output on the signal module? (6ES7223-1BH32-0XB0) .. I had to get that because the 1212C AC/DC/Rely has only 6 DC outputs ..

The good news is your "input" button on the HMI.. permits only 3 digits ..in the "Basic" version of TIA 11 .. which is fine.. because I only need to count to 255 ... :) I thought it would be cool to see the output in binary.. but, the "output" version of the same button, only permits 4 bits .. I guess I have to buy the professional TIA to be able to see all 8 bits. Actually, all I really need to see, is something happening when I hit the "launch" button.. and that line number reaches the Command Table, in the LinMot PID Driver/Controller, and the "Rail Gun" actuator, starts serious motions... :)

FYI: This is an actuator with no moving parts (other than the rod)..it lasts forever, billions of cycles, can work under water, massive force applied (up to 600 pounds), totally follows damn near any signal,with great precision, ... velocities and accelerations way beyond anything electromechanically available... Hydraulics might be able to out perform a LinMot Liinear Motor .. but, those don't work so well under water, and would need a serious PID Motion Controller. + Oil....

Thanks again, much regards, Michael
 
Last edited:
Check out the pic- go to your device view (double check device configuration)
See the arrow? Look at your addresses. So in this example QB8 is the byte. Q8.0 would be the first bit...Q8.7 is the 8th bit...

By the way- signal modules go in the center of the controller (the plastic cover in the center). The other modules go the right side

Your learning young padawan

As far as HMI- have you tried changing the format to Binary? then change format pattern to 8 digits

lb1.jpg
 
Last edited:
By the way- signal modules go in the center of the controller (the plastic cover in the center). The other modules go the right side

Communication modules go on the left, and signal modules go on the right. It is the Signal (or communications) boards that go in the middle.


but, the "output" version of the same button, only permits 4 bits .. I guess I have to buy the professional TIA to be able to see all 8 bits

Michael,

just an FYI: The licensing for the Portal engineering software just controls what products you can use, it generally doesn't expand the capability of the products you already have. Step 7 Basic does just 1200's, whereas Step 7 Professional does 1200/300/400/1500. Safety adds the 300/400/1500 safety cpu's. WinCC Basic (included in step 7) just does the basic panels. WinCC Comfort does the basic panels, comfort panels, the mobile panels, as well as the older multipanels.
 
But Master .... sigh! ... Are you running "Basic" V11 SP2 update 5?.. or something like V12.. Or V13? 'Cause I selected "binary" and the maximum field length was "4" .. And the grass hopper guffaws uncontrollably .. realizing the the little butter-warmer drawer on the Siemens PLCs is for a "Signal Board" .. the big ones that stack to the right (up to 8) are called "Signal Modules" .. I just purchased a cool signal board on eBay for the 2 analog inputs .. has 2 Pots mounted in the center..
 
You mean.. I must go back and figure out why I could only use a 4 instead of 8 bits on that button! Are you saying this is obviously ****pit trouble?
 
PS.. Thanks for the information about the difference in the TIA portals.. I think I will be fine for many years with 1200 stuff

And thanks too for the great illustration of Device Configurations .. Nice.. QB8 it is... :) Life has meaning once again...
 
Last edited:

Similar Topics

Hi all, Currently having trouble getting a speed reference to write over modbus to an Omron M1... I can successfully write a run command and...
Replies
6
Views
249
commentaire communiqué siemens s7-1200 avec vfd delta ? (cablage et sur tia portal )
Replies
0
Views
127
Hi, I have a 1214 on ip 192.168.0.100. This is connected to other modules through a switch on same network. I need to connect this to a company...
Replies
1
Views
178
Hi Experts, I would like to make firmware upgrade from v3.0 to v4.5 (S7-1200 CPU 1215C). Can I do it from v3.0 to v4.5? Do I need to take some...
Replies
6
Views
282
Hi Guys, I am trying to establish communication over profinet between Siemens S7-1200 PLC as IO device and codesys plc as IO controller. But I am...
Replies
43
Views
2,846
Back
Top Bottom