02-22-2019 10:47 AM
Hello,
I'm trying to read an analog input through an S7 1200 PLC using the 'Read AI' VI in the SP7 pallette. But it's not working. I don't see any values in the array output in labview. However, I do see the changing values in TIA portal (in a force table). Another question, why does it have 'array' output?
Unrelated question. Do I need the TIA portal for my connectivity (from siemens PLC to labview) to work correctly? Or is there another way?
Any help would be greatly appreciated! I'm very new to this stuff
Solved! Go to Solution.
02-22-2019 10:51 AM
I meant 'watch table' not force table
02-22-2019 01:12 PM
Figured it out!!
In my byte offset I was using values from 0 to 10. No input. Then I started going higher. Once I reached 64, I got an input in my array. I think this is due to the the 64bit version of labview I'm using possibly? Not exactly sure why that is but I'm glad its working now. Hopefully someone else will find this useful.
02-27-2019 02:21 AM
Sorry about the belated reply.
About your questions:
No, the offset 64 is not related to your 64bit LabVIEW-version. This is purely the byte offset from the PLC. Have a look at the analog input in TIA portal, it (ie the hardware address) should be IW64.
Read AI has an array output so that you can read several analog input (e.g. IW64 and IW66) with one VI call.
You do not need TIA portal for the LabVIEW connection to work properly. However depending on the type of your PLC you need TIA portal to make the required settings (cf. quick reference guide).
Regards,
DATA AHEAD
02-27-2019 08:26 AM
Thanks for reply!
Another question:
Is there a way to indirectly support RS485 communication through SP7? I read on these forums somewhere that SP7 doesn't support RS485 but is it possible to read each individual pin of the RS485 connector via separate 'read AI' VI's and then group those values into a cluster (or a similar solution)?
RS485 communication is vital in my project.
03-04-2019 08:43 AM
To my knowledge you cannot access the Data+ and Data- lines of a RS485 in a PLC directly. Even if it would be possible SP7 would be to slow to detect changes on these lines.
I suggest that you make yourself familiar how to programm/configure a serial device in a PLC via TIA portal.
Regards,
DATA AHEAD