Client fuction block

14 views
Skip to first unread message

Chibaye Mulubika

unread,
Mar 8, 2012, 4:36:28 AM3/8/12
to fb...@googlegroups.com
Hi,
 
I have two questions
1. Am using c# to communicate with client function block in net library. Each time I send a stream to the client fb, it receives the message from c# but unfortunately terminates.
 what could be the problem?
2. How best can one get the values ( integer values) from a c# programe into a function block  and which function block can best handle this?

James Christensen

unread,
Mar 8, 2012, 9:40:19 AM3/8/12
to fb...@googlegroups.com

Chibaye Mulubika

unread,
Mar 12, 2012, 5:45:46 AM3/12/12
to fb...@googlegroups.com
Hi,
At this stage, am able to send a message to the C# and from C# to CLIENT_1 function block and the message is received. After receiving the message, the CLIENT_1 function lock terminates.
 
The next time I want to send a message, I have to restart the function block.

--
You received this message because you are subscribed to the Google Groups "FBDK" group.
To post to this group, send email to fb...@googlegroups.com.
To unsubscribe from this group, send email to fbdk+uns...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/fbdk?hl=en.


James Christensen

unread,
Mar 12, 2012, 11:29:17 AM3/12/12
to fb...@googlegroups.com
This usually happens when one of the CLIENT function block's RD_x
outputs is connected to an input of another FB which is not of the
same type as the data you sent. The first time the CLIENT receives
such inconsistent data, the conection is terminated.

If you are trying to test the CLIENT FB by launching it in the FB
testing window, you can only send it data of WSTRING type. For data
any other type, you have two possibilities:

1) Embed the CLIENT block in a composite FB whose I/O is all of known
types; see for example the MECH2_PRXY block in the src/mva folder.
Then you can test the composite FB in the FB testing window. By the
way, this is the "proxy" design pattern for which documentation is
still incomplete; see
http://www.holobloc.com/doc/despats/proxy/index.htm.

2) Alternatively, you can place the CLIENT FB in a resource of a
system configuration in which its RD_x outputs are connected to
variables of known type. See, for instance, the RCV_REAL.RES0 resource
in the CODEC_TEST system of the fbdk/ita folder (that uses a
SUBSCRIBE_2 block but the principle is the same for a CLIENT block).
--
Best regards,
Jim Christensen

Reply all
Reply to author
Forward
0 new messages