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?
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.
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'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.
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.
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