Hi there, I’m currently working through the setup of the CNT2 INC2 module as a counter attached to a flowmeter. I was wondering if anyone has information/tutorials on accessing the process data for this module (ie reading the counts). I’ve set up modules with process data before but they’ve all had plug and play function blocks from the PLCNEXT store whereas this one does not. I’m using an AXC F 2152 controller. Any help would be greatly appreciated.
Hi, I have attached the user manual for this I/O module, which is also available on our website (and also available in German). Page 23 onwards describes each item of process data that you can read and write in PLCnext Engineer. If the description of the process data in the user manual does not help, then I can ask someone from our I/O support team to contact you, if that’s OK with you. ~ Martin.
Thanks for the response Martin. I was looking in the user manual but was unable to figure out how to access each word of the process data. My current questions are: (1) Is all the data described in the manual (14 words) stored in the ~AI0224 / ~AO0224 process data items. And if so what type of variable/data type would I need to create to be able to attach to these process data items? (2) If (1) is incorrect, are all of the process data items below ~AI0224 / ~AO0224 each a word that stores the data mentioned in the manual? I’ve attached a picture of the modules data list from PLCNEXT Engineer for reference. If you think it’d be more helpful to have the I/O team reach out to me I’d be more than happy to chat with them! Thanks!
Hi Kurdt, you can connect a byte stream to the ~AI/AO224 process data with a udt. - → Local → Data Type → DataTypes: TYPE arrPD_Stream : ARRAY[0..27] OF Byte; END_TYPE This stream contains than every processdata based on the description in the data sheet. BR, Frank
[quote]Is all the data described in the manual (14 words) stored in the ~AI0224 / ~AO0224 process data items.[/quote] Yes [quote]what type of variable/data type would I need to create to be able to attach to these process data items?[/quote] You can see that the data type of these variables is listed as “Octetstring[28]” in PLCnext Engineer. Octetstring is the same as an array of bytes, so you can connect these to a variable that is an array of 28 bytes. The 28 bytes correspond to the 14 process data words mentioned in the manual. [quote]are all of the process data items below ~AI0224 / ~AO0224 each a word that stores the data mentioned in the manual?[/quote] Also yes.
The process data items you see are BOOL and UDINT values that correspond to the process data in the manual. You need to click the little arrow in the column header to expand the columns and see the data types. This data is a duplicate of the data in the Octetstring[28] arrays, so you can choose to map the process data to variables either way. I find it much easier to work with the individual process data items (your option 2), rather than the single array. There are also two ways to map the process data items to variables in your PLCnext Engineer project: 1. Using the Data List window of the I/O module. This allows you to connect process data items to global variables (defined in the “PLC” branch of the project tree). [attachment]2021-04-21_8-39-34.jpg[/attachment] 2. Using the Port List window in the PLCnext branch of the project tree. This allows you to connect process data items to GDS ports on (for example) program instances. [attachment]2021-04-21_8-40-43.jpg[/attachment] There are arguments for each of these methods, but I find the second way to be neater, because it avoids polluting the global namespace, and it directly links the process data to the specific program(s) that you build to handle that data.



