Visual Productions forum

Author Topic: IOCORE2 controls the show in WATCHOUT through the UDP command.  (Read 87 times)

November 11, 2020, 10:48:12 AM
Read 87 times

BMC

  • Member
  • *
  • Posts: 5
Hi.

There is a problem with controlling the show in WATCHOUT via the UDP command in IOCORE2. How to make a delay between sending commands or carriage return (line feed). I send all commands at once and WATCHOUT gives an error.

Thx.

November 11, 2020, 04:46:53 PM
Reply #1

Bootsy van der Zande

  • Administrator
  • Member
  • *****
  • Posts: 366
Hi,

I'm very sorry you are experiencing issues with the IoCore2. I am not 100% sure what you mean though, can you explain a bit more?

So you are sending UDP messages from IoCore2 to WATCHOUT? How many are you sending at the same time?

You can send special bytes like newline and carriage return using the task "UDP - Send Bytes".
Just translate your message to HEX, and add the HEX value for newline("0a") or carriage return ("0d") at the end.

What does the monitor page of the IoCore2 say?

Greetings,
Bootsy

November 12, 2020, 03:00:13 PM
Reply #2

BMC

  • Member
  • *
  • Posts: 5
HI

Not sure if WO will accept HEX commands. The monitor shows that I am sending 2 commands at a time, although I am sending one at a time.
Here's what I was advised on the Datatone forum. But that doesn't quite suit me, I want to send commands via UDP and not via ArtNET (https://forum.dataton.com/topic/31464-launching-wo-show-by-io-from-iocore2/)

Thx

November 12, 2020, 06:31:08 PM
Reply #3

Bootsy van der Zande

  • Administrator
  • Member
  • *****
  • Posts: 366
Hi,

Don't worry, all UDP messages are translated to bytes before they can be transferred over the network. HEX is just easier to write than plain bits! And a normal string is even more easy to write than HEX.

See here an example of how the same message can be written in ASCII, HEX or Binary :

ASCII:   
s
e
t
I
n
p
u
t
<Space>
T
e
s
t
<Space>
1
<Space>
<CR>
Hex:   
73
65
74
49
6E
70
75
74
20
54
65
73
74
20
31
20
0D
  Binary:   
01110011
01100101
01110100
01001001
01101110
01110000
01110101
01110100
00100000
01010100
01100101
01110011
01110100
00100000
00110001
00100000
00001101

 But as control characters like Carriage Return (what you need) are not something you can easily write, many systems have thought of a way to circumvent that. Unfortunately, this means many systems have different ways of doing this... As I can see from your topic on the dataton forum, WATCHOUT uses "$0D" to write the carriage return character, which is essentially HEX as well. In C-based programming languages it is often "\r".

In the IoCore2 you can use the "Send Bytes" feature to send the UDP packet with special characters. You will need to enter the entire message you want to send in one long HEX string.   ( Don't use Send String Hex )  Start with translating your message without the control character, you can use the website I entered below. Copy that into the first parameter of the UDP task "Send Bytes". Now simply append the HEX value of your control character at the end!

This can be a nice tool to translate: (Be sure to disable "Padding" if you want to use it in the IoCore2)
https://www.binaryhexconverter.com/ascii-text-to-hex-converter

To find the HEX value of your control character, you can search for an ASCII table, like this one:
https://www.ascii-code.com/

Regarding the message sending twice, I'm guessing you are using the "Execute" button. Because of the design of ShowControl, this will actually trigger your task or action twice. Once is when you press the "Execute" button, and the second one is when you release the button. When the action is triggered via (for example) GPI, you can set the trigger flank to choose between "Down", "up" and "Change". In a lot of cases, this equals the pressing and releasing of a button, much as the "Execute" button does.

Long story short, I've added an example of sending "setInput Test 1<cr>" below. 

Greetings,
Bootsy

November 13, 2020, 03:35:30 PM
Reply #4

BMC

  • Member
  • *
  • Posts: 5
Hello

Thanks for the suggested solution. I'll try it next week when I get the chance.
Another question arose, can you configure so that when the button is pressed, one command is sent and when you release the button, then another?

Thanks

November 13, 2020, 04:54:45 PM
Reply #5

Bootsy van der Zande

  • Administrator
  • Member
  • *****
  • Posts: 366
Hi,

Let me know how it goes! This should work. (Although I have not looked into the watchout documentation... If you can't get it to work, can you post a link?)

Yes, you will have to make two separate Actions for it. Then it is done by setting the Triggerflank to "Down" for one action, and "Up" for the other. When it is set to "Change" it will respond to both press and release.
Please do test with actual buttons/GPI, as the Execute button will behave differently.

Greetings,
Bootsy

November 13, 2020, 07:51:39 PM
Reply #6

BMC

  • Member
  • *
  • Posts: 5
Hi

Ok, thanks. ;)
I will definitely write about the result.
There is no way to test now. The equipment is installed in the museum and it is not always possible to carry out testing under these conditions. ::)

November 19, 2020, 01:54:50 PM
Reply #7

BMC

  • Member
  • *
  • Posts: 5
Hi

Thank you for your help, your tip helped me solve my problem.

Quote
Yes, you will have to make two separate Actions for it. Then it is done by setting the Triggerflank to "Down" for one action, and "Up" for the other. When it is set to "Change" it will respond to both press and release.
Please do test with actual buttons/GPI, as the Execute button will behave differently.

Now, when the button is pressed, icore sends a command with a value of 1 to the WO input, and when I release the button, it returns a value of 0. Super!

THX  ;)

November 19, 2020, 03:36:59 PM
Reply #8

Bootsy van der Zande

  • Administrator
  • Member
  • *****
  • Posts: 366
Hi,

That's great!

A value of 1 and 0 could actually be achieved with a single action/task sometimes, using "control". But if this works for you, there is definitely no need to change it :)

Greetings,
Bootsy

 

SMF spam blocked by CleanTalk