Skip to main content

serial com with spinview w/ blackfly S - BFS-PGE-31S4M

Answered

Comments

7 comments

  • Official comment
    TDY_Demos
    Community team
    Expert (Gold)

    Hello Ricardo,

    The TAN walkthough using the FlyCap2 or SpinView GUI is a cumbersome way to use serial port, but it is a way to show users the required nodes and how to transmit and receive characters to make sure everything is wired up and working correctly.

    I have made up new instructions at https://teledyne.box.com/s/f29zytgmt4axphassb5cwzmx1g4uimgq with the same tables but using the SpinView application and using the appropriate nodes instead of registers.

    Realistically in an actual application, this would be done via the API, so following the serial port example source code we have can help on how to do that.  Like Flycapture, you still need to read and write the receive and transmit buffers, in spinnaker this is just done via file access instead of a block register read/write.

    The main use for this serial port functionality is if you want to hook up a serial device that is close to the camera, saving you from running to a serial port on the PC.  It is still up to the user/software to read and write the receive and transmit buffers, the camera will not automatically talk to a serial device or do anything with incoming serial data.  Essentially, you are using the camera as a COM port that you can read and write to.  Often, users may control a lighting board by using the serial port to program lighting parameters, and read back the return code to ensure everything was set properly.

    In your case, what are you trying to do with the Cortex M4 board?  Are you trying to use the camera to set some settings to the board?  If you are just trying to use it to trigger the camera, you do not need to use serial port, your board can send a TTL pulse to the cameras GPIO pin to trigger the image.

    I hope the document helps understand the process of using serial port, but if you need help explaining how it could help in your project, please let me know.  If it is confidential, feel free to instead make a ticket with us at support.flir.com and selecting "Ask a question".

    Thank you,

    Demos

     

  • TDY_Demos
    Community team
    Expert (Gold)

    Hello Ricardo,

    Thank you for your question.  You are correct, the TAN is mostly centered on the Flycapture2 method since it was quite involved with registers.

    For Spinnaker, we use the camera nodes instead, and there is a link in that TAN to the Serial Port nodes and process in our technical reference manual. 

    That manual tries to guide users on how to use serial port with the genicam nodes, but I can see how laying it out step by step like the FlyCapture2 registers can be useful.  I will add a column to the current Table in the TAN and mention the camera nodes for each step.

    It is quite cumbersome to send and receive serial data manually through the GUI, and our source code example would be the best way to get serial port working in your application.  If I can help clarify the example at all, please let me know.

    I should be able to get you an update on the TAN with the Spinnaker method by the end of this week.

    Thank you,

    Demos

     

    1
  • Ricardo S Barroso

    wow thanks for the quick response!!!

    On my application, I am trying to make an LPC54102 (CORTEX M4) communicate through the serial port with my blackfly S camera. I am using the serialRxTx.cpp example code to achieve this. But I would like to be able to access the register to make it useful.  

    The way I was able to make it "somewhat"  work is by having two serial com ports available, one is getting used by PuTTY, then I run the example code on VS and then when the window from the example code opens, I start typing some random stuff in the PuTTY terminal and I can see that on the window from the example code some times or I should say most times the my input is received by the serial comm on the camera. This is good because at least the wiring is correct but i would like to get deeper and be able to access the registers as I mentioned before. 

    Not sure if this is the right approach to take, on the example code only mentions one serial comm terminal required but i was not able to achieve this with only one. 

    Do you have any suggestions or recommendations ?????

    thanks, 

    Ricardo B.  

    0
  • Ricardo S Barroso

    I am sorry, if spinnaker is focused on nodes, I would like to be able to access this nodes through the serial comm.

     

    thanks again, 

    RB.

    0
  • Ricardo S Barroso

    One of the end goals will be to extend the capabilities of the camera by adding some sensors that will be controlled by the mcu and make it capable of retrieve the sensor info through the serial comm, another one will  be able to update the firmware on the mcu through a bootloader that will require to send image from serial comm. 

    As I mentioned in the first comment, using the serialRxTx.cpp code, I've stablish the communication between the mcu and the camera. how I achieve this was by constantly sending some text through the mcu hooked to one comm port and having the other comm plugged to the camera gpio, for starters this is good but now I need to extend this a little further. 

    I will definitely need some assistance with the cpp code, will this be the best line of communication for it or should go through support ???

    thanks a lot for your help, someone please give this man a rise haha. 

    0
  • TDY_Demos
    Community team
    Expert (Gold)

    Hi Ricardo, this will certainly require more specific coding, and I think would be outside the scope of the forum.  Please raise a ticket, and you can mention that you have worked with Demos in it.

    The final setup will be the cameras GPIO being wired as a serial port going to your mcus serial port.  No need for another connection between the PC and the MCU in the final application.  Opening an extra terminal just helps verify the communication is going back and forth.

    Our sample code shows a complete "camera to PC terminal" workflow.  You would not need all that once you connect to the mcu, you would just need the code that transmits and receives data from the cameras serialport buffer.

    Please raise a ticket at support.flir.com and we can help you work through this.

    Thank you,
    Demos

    0
  • Ricardo S Barroso

    thanks Demos, have a good weekend!

    I will raise the ticket right now. 

    0

Please sign in to leave a comment.

Powered by Zendesk