|
absent?
missing?
lost in action?
missed?
|
|
|
|
|
In order to set a camera's IP to match my network, I have to connect to that very camera.
And here it comes:
How can I connect to a camera whose IP I don't know?
Ciao,
luker
|
|
|
|
|
I expect devices such as yours to have a factory default IP address.
So if the device is new, read the documentation.
And if it has been used before, restore the factory default.
FWIW: my ADSL modem/router has the factory default IP address printed on the bottom.
|
|
|
|
|
In general, factory defaults are a good way to achieve a well-defined system state.
But in this case, to reset the camera to its defaults, the user needs a connection to that camera. In order to establish a connection, he needs to set the camera's IP address to some value that will work within his network.
I know it's possible to do so because Stemmer Imaging's GigE Vision Configuration Manager does the job very well.
Just a guess: Maybe it's about throwing some broadcast call at the network and listening on a specific UDP port for answers?
Anyone familiar with GigE Vision / Gen<I>Cam?
Ciao,
luker
|
|
|
|
|
To add to Luc's answer, if you don't know the IP address, find it. Have a look at the router it is connected to - most will display a list of all connected devices. Make a list of them, and then disconnect the camera. Refresh the list, and bingo! There are only a few default IP addresses for routers: 192.168.1.1, 192.168.0.1, and 192.168.0.254 are the common ones.
Do note that unless told otherwise, routers do not have to assign static IP addresses - they can apply them dynamically so it may change from day to day.
Normally, the install software for the camera would search for the device and report the IP address if needed.
Did you know:
That by counting the rings on a tree trunk, you can tell how many other trees it has slept with.
|
|
|
|
|
If I understand you correctly, what you are describing is some sort of manual approach. But I need to code something that always works, or at least throws an error message telling the user why it doesnt work.
Ciao,
luker
|
|
|
|
|
Dear All,
I have so many barcode readers which are connected from usb port. I have to differ each other so I need to get device ID of each of them. I think it is possible because I installed and use USBTrace and it gets.
How can we handle it using c#?
Thank you for your concerns.
|
|
|
|
|
|
Dear Mircea,
First of all, thank you for your concern.
I have just checked the solution and tried but there is something that i do not understand
What should be the values of VID and PID. they are assigned automatically and program gives always disconnected message.
Method USBClass.GetUSBDevice cannot regocnize my barcode reader.
Thank you in advance
Kind regards
|
|
|
|
|
Article's author ist definitely more qualified to answer that
SkyWalker
|
|
|
|
|
Sorry, I didn't check
I guessed that you were poster.
Thank You.
|
|
|
|
|
I can not find avarage function in C#. Do I need to write it myself or I missed it?
|
|
|
|
|
It's in the LINQ extensions: Ienumerable.Average[^]
Did you know:
That by counting the rings on a tree trunk, you can tell how many other trees it has slept with.
|
|
|
|
|
Thanks for your answer
|
|
|
|
|
Which average? The arithmetic mean, mode or median? They do different things - so you need to work out what it is you want to do.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
You could add root mean square, harmonic mean and geometric mean to that list.
Not as commonly used but still averages.
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
The only valid measurement of code quality: WTFs/minute.
|
|
|
|
|
Indeed. This is one of the bugbears I have with systems that say they have Average capabilities - the lack of precision in saying which one it is.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
I am having a little bit of trouble trying to copy part of a 2d array to 1d.
In c/c++ i am using memcpy( OutBuff[pathId], writeBuff, writeLen );
In c# i am trying to use System.Array.Copy(writeBuff, OutBuff[pathId], writeLen);
The compiler doesn't seem to like this and i have searched for an answer but cant come up with anything.
Thanks for any help.
|
|
|
|
|
jollygiant wrote: The compiler doesn't seem to like this
So what does it tell you? It is not possible for us to guess what diagnostic messages appear on your screen.
It's time for a new signature.
|
|
|
|
|
The compiler reports
Argument 2: cannot convert from 'byte' to 'System.Array'
Here is the definition of OutBuff
private byte[,] OutBuff = new byte[MAX_PLCS,MAX_BUFF_SIZE+2];
Here is the function where used
public int writeBlock(byte path, byte [] writeBuff, int writeLen)
{
System.Array.Copy(writeBuff, OutBuff[path], writeLen); // <---- error line
|
|
|
|
|
Your function definition takes a byte array (writeBuff ) as its second parameter but you refer to OutBuff in your call to Copy . The line:
System.Array.Copy(writeBuff, OutBuff[path], writeLen);
should read something more like
System.Array.Copy(writeBuff, writeBuff??, writeLen);
although I suspect your parameters need refining.
It's time for a new signature.
|
|
|
|
|
The following seems to work:
System.Array.Copy(writeBuff, OutBuff, writelen);
The only question remaining is how to point the source to the correct offset of the 2D array. I suspect using the version of copy that takes offset values for source and destination.
Interesting problem though - any expert Csharpers who can comment?
It's time for a new signature.
|
|
|
|
|
OK third time lucky(er) ...
I discovered that Array.Copy requires both arrays to have the same number of dimensions. Also to copy from any point beyond the first element, e.g. starting in the next dimension, can only be done by using offsets. Thus the following sample is the way to go:
byte[,] OutBuff = new byte[3, 3];
byte[,] writeBuff = new byte[,]{ {1,2,3}, {0,0,0} };
System.Array.Copy(writeBuff, OutBuff, 2);
int offset = OutBuff.GetLength(0);
System.Array.Copy(writeBuff, 0, OutBuff, offset, 2);
Incidentally I just took a look in Charles Petzold's reference .NET book Zero[^] and he comments that:
Multidimensional arrays seem to be less common in object-oriented programming than in traditional procedural programming. It‘s probably more common in object-oriented programming to have single-dimensional arrays of objects, where the objects themselves encapsulate multiple items.
It's time for a new signature.
|
|
|
|
|
Thanks for your time and effort, i will give this a go on Monday.
|
|
|
|
|
You're welcome, it was a good learning exercise for me as well.
It's time for a new signature.
|
|
|
|