S7-400 error when reading from analog card.

JesperMP

Lifetime Supporting Member + Moderator
Join Date
Feb 2003
Location
ᚴᚬᛒᛅᚾᚼᚬᚠᚾ
Posts
16,303
Hi guys,

hope somebody can give a clue to this one:

Have a S7 413-2 DP with an 8-channel analog card in the rack.
The card is set up with the right MFLB number, and the channels on board are all activated as 4DMU (4 wire 4-20mA).

Here is the problem: if I read one of the channels like this:
L IW 128
I get an error message in the hardware diagnostics "Area length error when reading" and the return value is allways 0 (zero).

However if I do an immediate read like this:
L PIW 128
I get a proper return value from the channel.

any suggestions ?
 
JesperMP

I am pretty sure that all analogue cards do need to be addressed as PIW and PQW, (peripheral input and output words) rather than straight input and output words, this is consistent with what you have asked.

I have not used any analogue cards with a S7 yet, so I cannot confirm this, perhaps Jean Pierre can

Paul
 
Hello Jesper;
PLucas is right in that you access the analog signals as PIW or PQW in a S7 program. When you use the IW or QW addresses, you are reading or writing from the input/output image table, an internal register array that is updated from the inpus and outputs at every scan. Siemens assumes that when you work with analog inputs/outputs you want the immediate value to be updated on the module connection; that is why it allows you direct access on the periphery (that is what the «P» stands for in PIW/PQW).
Hope this helps,
Daniel Chartier
 
Thanks to both of you :) ,

I just figured out what confused me:

In newer S7-400 CPUs you can specify that the analog io can be scanned by one of (or the only one) of the tasks that is running in the CPU. In that way it will act as standard IW/QW words that are scanned before/after the main task. This is what I (unknowingly) was doing allready.

In older S7-400 CPUs (like this S7-413) there is no such functionality. Therefore analog io can only be accessed with PIW/PQW in these.
 

Similar Topics

Hi, I'm having an issue with a mircologix not transmitting out. The current setup is a mircologix 1400 connected to a Guardian 100 Radio...
Replies
1
Views
108
Hi, I have a Delta DVP-12SE setup in ISPSoft. I created a few custom function blocks for motors and now want to implement it but the moment I...
Replies
2
Views
1,128
Hi guys, I have the same program in my CPU and in my SD card but when I boot from the SD card I get error message 2400 which relates to some...
Replies
4
Views
603
Good Afternoon. I am having a problem going online with S7-400. Attached is the error that I am getting. I have looked at the help file but the...
Replies
7
Views
1,763
I have a Allen Bradely 1500 that has a cracked board. It still works but needs replaced (battery is no longer connected). To make migration easier...
Replies
10
Views
3,220
Back
Top Bottom