RobotStudio event

How to listen the signal I/O domain

Options
In the PC SDK app. manual related about 2 ways: read value of signals  &  listen to signal channel.
 

in my application code, I add also 2 ways : one button is to read the signals once

 

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click

 

one button is to start listening signal

 

 Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

 

all things I do is just refer to the PC SDK's user manual , but there's some problems about the code, VB.net said the wrong is here:

 

        Dim val As Integer = digitalSig.[Get]()

I have no idea about the error, who can help me to solve this problem?

 

and If I want to read the signal value, is there several steps to take:

 

1. Search for IRC5

 

2. connect to specific IRC5

 

3.get signal

 

4.Start subscriptions

 

5.listen to the signals

 

6.stop subscriptions

 

I don't know if I understand correctly, please help me , thanks

 

the Dev. Environment is VB.net, this is my code .

 

Comments

  • hjtp
    Options
    the code is download please click the idea about error line
  • Hi
    I'm running your code against a virtual controller. Scanning and connecting to a controller seems to work OK but I'm a bit confused about Button4. You say that your app is reading an IO once when clicking Button 4 but for me all digital input signals are listed. Can you please tell me which button you are clicking when you receive the error. Also screen dump the error message that is displayed and attach to this post.

    Thanks!
    Lennart H
  • hjtp
    Options
    Oh~~~,I'm sorry I'd made a mistake, After I changed the signal name, it's ok now, thanks!