FOUNDATION Fieldbus

cancel
Showing results for 
Search instead for 
Did you mean: 

FF OPC read & write Mode Status

How do I read & write to a block Mode Status using the OPC server.  For example I thought that each (such as Actual, or Target, etc) would be a bit mapped byte with each bit representing a mode, but it does not seem to work this way.
0 Kudos
Message 1 of 7
(8,733 Views)
You can get a block status by reading MODE_BLK.ACTUAL (type = uint8)
You can set a block status by writing MODE_BLK.TARGET (type = uint8)

For example, you can set a block to OOS by setting MODE_BLK.TARGET = 0x80.
If you find MODE_BLK.ACTUAL is 0x08, then it is in Auto.

The followings are the mode value description.
0) Value 1
Desc |en|ROut
Help |en|Remote Ouput Mode
1) Value 2
Desc |en|RCas
Help |en|Remote Cascade Mode
2) Value 4
Desc |en|Cas
Help |en|Cascade Mode
3) Value 8
Desc |en|Auto
Help |en|Automatic Mode
4) Value 16
Desc |en|Man
Help |en|Man
5) Value 32
Desc |en|LO
Help |en|Local Override Mode
6) Value 64
Desc |en|IMan
Help |en|Initialization Manual Mode
7) Value 128
Desc |en|OOS
Help |en|Out Of Service Mode
0 Kudos
Message 2 of 7
(8,727 Views)

Thanks for the feedback.  I must have a problem with the OPC server.  When I use the NI Server Explorer I get a symbol like a bold I for Actual, Target, but for Permitted I get a ? as a value.  I tried a different Client but still have problems.  I can have the client display the value in different formats but none seem to correlate with the correct value (i.e. 0x08 for Auto).  Sometimes the number being displayed will change when I change the Mode from a different source and mostly it won't.  The OPC server seems to work fine for other parameters I have accessed but for Mode it has been a problem

0 Kudos
Message 3 of 7
(8,724 Views)
Yes. It is annoying that Server Explorer tries to convert a uint8 to a symbol character.

You can use the free Softing OPC client
ftp://ftp.softing.com/pub/outgoing/opc/tbx410/ClientE/ClientE.exe

I test Softing OPC client 4.0. It works well.
0 Kudos
Message 4 of 7
(8,715 Views)
I tried the Softing Client and it displays the Mode just as described.  Now I just need to get my HMI Client vendor to upgrade to include these FF data types!
0 Kudos
Message 5 of 7
(8,706 Views)
Hi, I also have a problem with reading and writing to OPC. I used LV exaples for writing & reading. When I use VI for only writing or reading everything is OK but when I use this programs in one VI the LV stops responding. I am using LV 8.2 and I herad it is a litle bit unstable could that be a problem or I am not using those examples correctly. I sould be able to use these functions togeather, because I saw some examples for that, but they have some parameters I dont know hot to set. The example I am using can be found in folder examples\comm\opc.lib\NI Demo OPC client.vi.
0 Kudos
Message 6 of 7
(7,993 Views)

Please see the sub vi 'Datasock Read.vi' of 'NI Demo OPC Client.vi'

The parameter 'ms timeout' controls the time interval between two read actions. The boolean parameter 'timeout' controls whether the time interval takes effect.

You can tune or disable the 'ms timeout' value. If the interval value is too large, the application may looks like crashing.

For more help, you can send your problem description with your own VI to  fieldbus.support@ni.com. We can help you analyze the problem.

Thanks!

Feilian (Vince) Shen
0 Kudos
Message 7 of 7
(7,975 Views)