DATA AHEAD toolkit support Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

SP7 'Read AI' VI. Need help!

Solved!
Go to solution

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

0 Kudos
Message 1 of 6
(4,978 Views)

I meant 'watch table' not force table

0 Kudos
Message 2 of 6
(4,975 Views)

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.

0 Kudos
Message 3 of 6
(4,960 Views)
Solution
Accepted by topic author TheDude4707

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

Kudos are welcome...
Message 4 of 6
(4,941 Views)

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.

0 Kudos
Message 5 of 6
(4,934 Views)

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

Kudos are welcome...
Message 6 of 6
(4,893 Views)