Best Of
Re: Faulty MST-1001
Ah, that's a G4 capacitive touch, it doesn't have a calibrate option.
I have a MXT-700 that I use for testing. A couple of years ago the right 1/3 of the screen didn't respond to anything, had to be repaired by AMX. Don't know if it is currently still possible to get a RMA for that panel.
You could attach a USB keyboard to it (2 USB connectors on the back) to see if if it works; if it does, the touch part is defective.
You could also try with the ^VKS command (Virtual Key Stroke) from 'Control a device' in NS, although I don't know how to send the keypad 'OK', never had much luck with that.
EDIT: If the button is stuck in the 'on' position, that would seem to lock up the panel, I've seen that in older panels, like the NXD-1200, with the large button on the front.
Re: Faulty MST-1001
It seems the MX series capacitive panels are dying en-mass lately. We've retired nearly half of the ones we installed already for exactly this issue.... partial unresponsive areas, or continuous triggering of areas. In a VERY FEW instances, diligent cleaning of the surface seemed to help a bit.
Re: DEFINE_FUNCTION
Can you leverage a FOR loop with the LENGTH_STRING(cProj_Buffer[]) as the loop count limiter within a single function?
Like Eric mentioned, I was concerned about data types, but after trying several combinations of ATOI or HEXTOI - it didn't end up needing it to correctly perform the additive math I was going for in this demo. We still do not have the full details of what you are trying to accomplish, but based on my assumptions - here is what I wrote to test the function. NOTE - as a calculation, you need this function to be an INTEGER and not a CHAR for the return type.
PROGRAM_NAME='FunctionTest'
DEFINE_DEVICE
dvTP = 10001:1:0
DEFINE_CONSTANT
INTEGER nTestBtns[] =
{
1,
2,
3
}
DEFINE_VARIABLE
CHAR cSampleData[3][10]
DEFINE_FUNCTION INTEGER fnCheckSum (CHAR cPROJ_BUFFER[])
{
STACK_VAR INTEGER nResult;
STACK_VAR INTEGER nTempCounter;
SEND_STRING 0, "'fnCheckSum called with cPROJ_BUFFER LENGTH of ',ITOA(LENGTH_STRING(cPROJ_BUFFER))";
FOR(nTempCounter=1; nTempCounter<= LENGTH_STRING(cPROJ_BUFFER); nTempCounter++)
{
nResult = nResult + cPROJ_BUFFER[nTempCounter]
}
RETURN nResult;
}
DEFINE_START
cSampleData[1] = "$10"; // SUM = 16
cSampleData[2] = "$10,$11,$5E"; // SUM = 127
cSampleData[3] = "$10,$11,$5E,$24"; // SUM = 163
DEFINE_EVENT
BUTTON_EVENT [dvTP, nTestBtns]
{
PUSH:
{
SEND_STRING 0, "'RETURNED SUM = ', ITOA(fnCheckSum(cSampleData[GET_LAST(nTestBtns)]))"
}
}
Re: DEFINE_FUNCTION
I cannot tell what kind of variable cPROJ_BUFFER[] is. I'm assuming it's a char.
Netlix is a bit funn when it comes to type casting. What you might think of as a char in other environments is not exactly what Netlinx does. Can you post what the string you're working with is?
Re: Copying info from a .TXT file
do NOT forget to close your files when you are done. ![]()
Re: DEFINE_FUNCTION
Pat - the screenshot is from the overview video and is more of a static example. Did the content that followed the overview, and gave real examples inside Netlinx Studio help clarify this concept for you? Be sure to watch the concept review video at the end of the section which will walk through the completed exercise and demonstrate one way to solve for the task.
Re: DEFINE_FUNCTION
sBuffer for this checksum function should contain all those hex values but this snippet doesn’t show where or how that gets populated.
vining
Re: Cheap Lighting?
Note that the insight above expired more than 10 years ago. iLight is now part of Eaton, who might have some solutions you like in any case.
IR File for Toshiba SD4010KB CD Player (Hand control: SE-R0376)
Captured with my IRIS and IREdit:
Toshiba SD4010KB CD Player
Re: Copying info from a .TXT file
Check the help file for FILE_OPEN, FILE_READ_LINE, FILE_CLOSE, etc. Those functions give you what you need to open a file with a file handle, read lines from it, and close the file handle.