I am using a LOGO to collect temperature data. The LOGO works properly and shows a lecture of 18°C. The data is connected to a NAQ block in LogoSoft with virtual address 0. I am currently using the node-red contrib s7 node to get the temperature in node red. The address that I use in the node is DB1,INT1406.
Unfortunatly, the node-red node only shows a 8, so there´s missing information. What can be the problem?
Where is is showing that? In a debug node directly on the output of the S7 node?
The output of the S7 node. I´ve notice that the address just after that shows a value with no sense to me. I think that the sensor value ocupiess two positions in the memory of the LOGO and Node-Red only read one position, but I´m not sure about that...
I attached here a couple of photos of the values showed in NodeRed and the address.
NAQ0 corresponds with DB,INT1405
Connect a debug node and show us what the data looks like.
Can you show also the address and the type of the variable in logo software?
And please do screenshots or copy/paste text, not photos.
Here is a picture of the debugg node. The info is the same.
I'm sorry. I don't like taking pictures either, but the device is not connect to Wifi and the USB port is very difficult to access so the best way to get the info is taking a photo.
I will try to do it, but it will be a bit complicated. I will try to do it on Monday because i can't access LOGO now.
Have you tried to change the type of data read? likes B1? I see your offset between variable is only a byte in the first photo
Do you mean change de INT for a B or X? I haven't tried it yet.
Yes you have to make sure what kind of variable you are reading if it is a ShortINT, DoubleINT, REAL etc...
I thought it was a INT but I don´t really know... How can I know what kind of variable it is?
See from the logo SDK in the variables table
I've seen that is a WORD variable. As soon as I can I will change the type of data and try again. Related to this I've another question.
If I needed to read 2 consecutive words (the variable in LOGO requires 2 words) how could I do it? Would I need to read the first address and leave the second address blank?
If a single variable is made by two word you should use a DWORD (Double WORD) which will point to two words from the starting address.
If this variable is a real number(number with comma) you can also use REAL to directly read its value as number with comma.
To better understand this I suggest you read an article like this so as not to go too far from the forum topics.
Thank you very much for the article, it's quit interesting. The community of Node-Red is without any doubt the best part of it.
If someone is having the same problema as me: I couldn't test yet the solution since I don't have the device disponible, but I've seen that the syntax should be DB1,WORD1406. As soon as I can test this, and the solution works I will mark the topic as solved.
Yes, to read int values I use also WORD. It works with S7 PLC.
I can test it recently but I still have the same problem.
While the sensor shows 36.4°C, the Node shows 338. I'm not sure what can cause the problem. I use WORD and INT and get the same value (in the documentation I've seen that the difference between WORD and INT is that WORD reads a unsigned and INT reads a signed).
I think I should use REAL or convert the AI to integer using the block I attached here but this is strange to me. The LOGO documents says that AQ (the block I'm using to read) shows the data as 16bits signed
Can someone help me with this problem?
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.