Configure Double Command in IEC driver

Find and share HowTos to various installations / configurations!
5 posts • Page 1 of 1
xavi.aran
Posts:63
Joined: Thu Apr 21, 2011 1:21 pm

Configure Double Command in IEC driver

Post by xavi.aran »

Hi! I need to addressing a Double Command dp in IEC driver.
I don't know how can i configure the addressing for a Selection/Ejecute option.
I don't know what is the steps to send a selection and how can i see the selecction is correct and latet send the execution.
The type is 46, and the quality Information is 128 to activate Selection/Ejecute...i know...but i don't know the step by step to do the order correctly.
Can anyone help me?
Thanks!!

Gertjan van Schijndel
Posts:634
Joined: Mon Aug 02, 2010 10:37 am

Re: Configure Double Command in IEC driver

Post by Gertjan van Schijndel »

The command qualifier can be set in an user byte (config entry 'connUserByteQ') or in a second dpe by using a special 'COT' address.
This and more information can be found in the online help -> Drivers -> IEC -> Quality identifier

xavi.aran
Posts:63
Joined: Thu Apr 21, 2011 1:21 pm

Re: Configure Double Command in IEC driver

Post by xavi.aran »

Sorry, but the online help about IEC is very bad...there you can't find any good information about the communication IEC.
I have a simple question (send a command with selection is a basic feature of IEC) and it's impossible to know how can i resolve reading help....
Can anyone help me a bit more?

Gertjan van Schijndel
Posts:634
Joined: Mon Aug 02, 2010 10:37 am

Re: Configure Double Command in IEC driver

Post by Gertjan van Schijndel »

I do not have experience with this, so did you try this example from the online help:

config entry:
[iec]
connUserbyteQ = 1

Code: Select all

// select
dpSet("command.:_original.._value",      1,
      "command.:_original.._user_byte1", 0x80);

// execute
dpSet("command.:_original.._value",      1,
      "command.:_original.._user_byte1", 0);

alug
Posts:42
Joined: Mon Oct 18, 2010 11:00 am

Re: Configure Double Command in IEC driver

Post by alug »

Hallo,

unfortunately there is an error in the online help example.
The correct code is:

// select
dpSet("System1:command.:_original.._value", 1, "System1:command.:_original.._userbit8", 1);

//execute
dpSet("System1:command.:_original.._value", 1, "System1:command.:_original.._userbit8", 0);

because the S/E Bit is the highest bit in the quality byte and connUserByteQ = 1 means the userbits 1-8.
So with _userbit8 you can define if it is a Select or an Execute.

best regards

Andreas

5 posts • Page 1 of 1