S7-1500 Read->Convert->Transfer into GDB

BVG

Member
Join Date
Apr 2012
Location
Ghent
Posts
10
Dear all

For a certain project I have 100+ temperature measurements. Each measurement has a tag name(coming from the electrical schemes).
I want to use those tag names as reference in my program. So the idea is to transfer the measurements to a Global DB in REAL format.

So I started with a FOR loop using the PEEK_WORD in SCL, Convert it to a Real and divide it by 10. (If you do not divide it by 10 you read 240.0°C as room temperature). But that part works perfect.
My next idea was to use Poke in the same loop and transfer the converted data to my DB. The problem is Poke does not transfer REAL formats.

If someone can put me in the right direction I am happy to hear some your ideas.

Kind regards
 
Use the AT declaration to make a real and dword variable exist at the same address. Use the real variable in your arithmetic and the dword variable in the poke instruction. e.g.

poke1.jpg
 
Use the AT declaration to make a real and dword variable exist at the same address. Use the real variable in your arithmetic and the dword variable in the poke instruction. e.g.

Thanks for sharing this, definitely learned something new.
 

Similar Topics

Is there a way in the S7-1500 to read the contents of a directory on the Memory Card? I'm using the web browser to 'upload' .csv files to the...
Replies
4
Views
1,477
Good morning to all, I need to modify an existing PLC MIcrologix 1500 configured with a Modem on Channel 1 (DF1 Full Duplex) and an...
Replies
7
Views
1,395
Hi, I am using Siemens s7-1500. what module can I use to read voltage value up to 600 VAC? what module can I use to read fan RPM up to 7000 RPM...
Replies
7
Views
3,656
Hi Experts, I'm new to Siemens world. At the present time I'm programming a drive in TIA Portal. My setup is: Inverter G120 + CU 250S-2 + S7-1500...
Replies
2
Views
2,895
Hello everybody I am new. hope get some help on here. I have a micrologix 1500 Lrp and a marking device. I would like to use Ethernet to...
Replies
0
Views
1,349
Back
Top Bottom