Hello
I am not able to find an example of c# application to understand:
how to connect to a simulator instance (127.0.0.1)
how to read a variable
with PVI 4.11
Is there someone that has an example or a snippet?
Thank you very much in advance
Marco Sartori
kovarj
(Jaroslav Kovar)
November 12, 2024, 6:21pm
2
Hi, all official sample you can find in PVI installation folder. Default path is C:\BrAutomation\PVI\V4.11\Samples
Yes, but there is no example where ArSim is used…
Question is: which properties should be set on connection?
Thanks
michael_w
(Michael W)
November 13, 2024, 9:12am
4
Hi,
adapting the code to your needs requires looking at the generated documentation.
Going from the CPU object to the type of its’ Connection object and looking at DeviceType :
The example would get you something like this (I didn’t bother to change the style to that older line-by-line one):
cpu = new Cpu(service, "Cpu") {
Connection = {
DeviceType = DeviceType.ANSLTcp,
ANSLTcp = {
DestinationIpAddress = "127.0.0.1"
},
ResponseTimeout = 5
}
};
3 Likes
michael_w
(Michael W)
November 14, 2024, 11:03am
5
@mSartoriOptrel waiting patiently for a reply
2 Likes
Ahahah.
Many thanks @michael_w
Sorry for the late reply. I had the chance only to test the connection and it worked perfectly.
Hope this help someone else that has basic knowledges on c# like me
Thanks again
Marco Sartori
1 Like