Home AMX User Forum NetLinx Modules & Duet Modules

Question about Modules

Hi,
I'm currently prepare a program to control camera (Who is BackOrder). I have set the comport for each of them

Here's my device
DEFINE_DEVICE
dvCamIn1 = 5001:1:0
dvCamIn2 = 5001:2:0
dvCamIn3 = 5001:3:0
dvCamIn4 = 5001:4:0

dvCamOut1 = 5001:1:0
dvCamOut2 = 5001:2:0
dvCamOut3 = 5001:3:0
dvCamOut4 = 5001:4:0

vdvCam1 = 33001:1:0
vdvCam2 = 33002:1:0
vdvCam3 = 33003:1:0
vdvCam4 = 33004:1:0

Here's my variable
DEFINE_VARIABLE

dev dvCamIn[] = {dvCamIn1,dvCamIn2,dvCamIn3,dvCamIn4}
dev vdvCam[] =  {vdvCam1,vdvCam2,vdvCam3,vdvCam4}

Here's my module definition
DEFINE_MODULE 'Sony_EVI-D70_Comm' COMM1(vdvCam1, dvCamIn1, dvCamOut1)
DEFINE_MODULE 'Sony_EVI-D70_Comm' COMM2(vdvCam2, dvCamIn2, dvCamOut2)
DEFINE_MODULE 'Sony_EVI-D70_Comm' COMM3(vdvCam3, dvCamIn3, dvCamOut3)
DEFINE_MODULE 'Sony_EVI-D70_Comm' COMM4(vdvCam4, dvCamIn4, dvCamOut4)

When i send command directly thru the comport
SEND_STRING dvCamIn[PLVRoom],"'ZOOM=',ITOA(nCurrent_CAM),':S'"

I see the comport flash on my processor. but if i'm using the virtual device,
SEND_STRING vdvCam[PLVRoom],"'ZOOM=',ITOA(nCurrent_CAM),':S'"

Nothing appear on the com port, some one have an answer for me.

Thanks for help.

Best Regard

Comments

  • viningvining Posts: 4,368
    Can't say for sure but the module may verify actual communications with the device and if there's no active communications your commands aren't relayed to the device by the modle. However if that were the case you should see the com port's TX led flash periodically as the module tries to query the device to prove comms are ok.
  • HedbergHedberg Posts: 671
    Just off the top of my head (or something):

    I don't think that AMX modules echo strings sent to the virtual device out the physical device com port. I think that if you want the module to do something useful you don't use send_string to the virtual device, you use send_command to the virtual device.

    so, try:
    SEND_COMMAND vdvCam[PLVRoom],"'ZOOM=',ITOA(nCurrent_CAM),':S'"
    

    Also, when you send that string to the physical device, you are causing the string to go out the com port to the camera but it's not in the proper format for controlling the camera (see the EVID70 documentation for VISCA commands). The camera can't do anything useful with the 'ZOOM" command. It's the module which responds with its command handler which causes a properly formatted string to be sent out the physical serial port.

    See the documentation (an MS word file [ugh!]) for the AMX module for how this works.

    eta:

    Rule 1: always listen to Vining. Even when you get the functioning of the module figured out, you might not be able to get the module to send a string to the serial port without a camera being physically connected. AMX modules typically (as Vining suggests) have a communication requirement. Until the module sends a string on the serial port and receives back the proper response, it is very likely that the module won't do anything that you want it to do. I don't like this feature of the AMX modules because it makes it hard to set up and verify module functioning unless you have the physical device and there are many times when I would like to test the program by watching/capturing the strings going out the com port.

    Of course, AMX module advocates will claim, you don't need to actually look at the strings that the module is sending out (and you don't have access to the module code so you can't figure it out that way) because AMX modules always work and do exactly what they are supposed to do. Unfortunately, when you get on a job site and the module doesn't do what you want it to do you end up looking stupid when you could have figured it all out in advance at your leisure while sitting in your kitchen in your pajamas instead of trying to trouble shoot a module that you can't analyze under the watchful stares of a herd of vice presidents wanting to know why they can't use there conference room now when the total and complete functioning of something important like healthcare.gov hangs in the balance like the earth and AMX support won't answer your call.(cheap shot alert. AMX tech support is always, in my experience, competent and helpful)
Sign In or Register to comment.