Gx Works2 (Q-Cpu) Acyclic Communication Example; Reading A Parameter (Sequence 1) - HMS A8NDPV1 Instruction Manual

Plug-in option, profibus communication interface
Table of Contents

Advertisement

GX Works2 (Q-CPU) Acyclic communication example

3.6
GX Works2 (Q-CPU) Acyclic communication example
This chapter describes using acyclic communication through the A8NDPV1 Profibus option card
using GX Works 2 with a QCPU and QJ71PB92V Profibus Master. It contains examples of reading
and writing individual parameters, as well as arrays. First perform the setup using telegram 1.
The process of acyclic communication parameter read consists of a write request, and a response
read. For details please refer to the Acyclic Data Exchange subchapter 7.7. These operations are
done using libraries supplied with the QJ71PB92V module (lib_dpv1). To perform acyclic commu-
nication without this library, please refer to the Simple Ladder example (chapter "GX Works2 (Q-
CPU) Simple Ladder Acyclic communication example" on page 54).
3.6.1

Reading a parameter (Sequence 1)

Creating the request
Start by preparing the content for the parameter read request. The data request has the following
format:
Byte no.
0
1
2
3
4
5
6-7
Request reference is any valid number, this value is mirrored back in the response and can be
used to distinguish multiple requests. The parameter number needs to be byte swapped(the
SWAP instruction can be used to swap the lower and higher byte of a word).
In the code below requestParameterNo contains the unswapped parameter number, while re-
questParameterNoBS contains the byte swapped version. The content of the parameter re-
quest(DataToWrite), and the request to perform it (StartWrite), are shown in the screenshot
below:
34
Description
Request ID
Request reference
No. of parameters
DO-ID
No. of elements
Attribute value
Parameter number
Get Started
Value
0x01
0x01-0xFF
0x01
0x01
0x00
0x10 (value attribute)
Byte swapped PNU
Doc.Id. HMSI-216-127
Doc.Rev. 1.01

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the A8NDPV1 and is the answer not in the manual?

Table of Contents